Свойство | Тип | Описание | |
---|---|---|---|
$requestObject | eZ\Publish\API\Repository\Values\ValueObject | Since there is a need to prepare an object in several steps it needs to be hold until sent to the request body. | |
$responseObject | eZ\Publish\API\Repository\Values\ValueObject | |
Same idea as the $requestObject, since we need to verify it step by step it need to be stored (as object) for testing. |
Метод | Описание | |
---|---|---|
assertHeaderHasObject ( $header, $object ) | ||
assertObjectFieldHasValue ( $field, $value ) | ||
assertResponseErrorDescription ( $errorDescriptionRegEx ) | ||
assertResponseErrorStatusCode ( $code ) | ||
assertResponseObject ( string $object ) | ||
convertResponseBodyToObject ( string $responseBody, string $contentTypeHeader ) : eZ\Publish\API\Repository\Values\ValueObject | Convert the body/content of a response into an object. | |
getRequestObject ( ) : eZ\Publish\API\Repository\Values\ValueObject | Get the request object. | |
getResponseObject ( ) : eZ\Publish\API\Repository\Values\ValueObject | Get the response object (if it's not converted do the conversion also). | |
iSetTheContentTypeHeaderToInVersion ( $contentType, $version ) | ||
makeObject ( $type ) | ||
setFieldToEmptyArray ( $field ) | ||
setFieldToValue ( $field, $value ) | ||
setHeaderWithObject ( $header, $object ) |
Метод | Описание | |
---|---|---|
addObjectToRequestBody ( eZ\Publish\API\Repository\Values\ValueObject $object, string $type ) | Convert an object and add it to the body/content of the request. | |
convertObjectTo ( eZ\Publish\API\Repository\Values\ValueObject $object, string $type ) : |
Convert an object to a request. | |
createRequestObject ( string $objectType ) | Create an object of the specified type. | |
decomposeObjectHeader ( $header ) : false | string | Decompose the header to get only the object type of the accept/conten-type headers. | |
getResponseError ( string $property ) : integer | mixed | string | Get property from the returned Exception. | |
makeObjectHeader ( $object ) | Make content-type/accept header with prefix and type. | |
setRestBodyType ( string $type ) | Set body type of requests and responses. |
protected addObjectToRequestBody ( eZ\Publish\API\Repository\Values\ValueObject $object, string $type ) | ||
$object | eZ\Publish\API\Repository\Values\ValueObject | Object to be converted |
$type | string | Type for the body of the request (XML, JSON) |
public assertResponseErrorDescription ( $errorDescriptionRegEx ) |
public assertResponseObject ( string $object ) | ||
$object | string | Object should be the object name with namespace |
protected convertObjectTo ( eZ\Publish\API\Repository\Values\ValueObject $object, string $type ) : |
||
$object | eZ\Publish\API\Repository\Values\ValueObject | Object to be converted |
$type | string | Type for conversion |
Результат |
public convertResponseBodyToObject ( string $responseBody, string $contentTypeHeader ) : eZ\Publish\API\Repository\Values\ValueObject | ||
$responseBody | string | Body/content of the response (with the object) |
$contentTypeHeader | string | Value of the content-type header |
Результат | eZ\Publish\API\Repository\Values\ValueObject |
protected createRequestObject ( string $objectType ) | ||
$objectType | string | the name of the object to be created |
protected decomposeObjectHeader ( $header ) : false | string | ||
Результат | false | string | Decomposed string if found, false other wise |
public getRequestObject ( ) : eZ\Publish\API\Repository\Values\ValueObject | ||
Результат | eZ\Publish\API\Repository\Values\ValueObject |
public getResponseObject ( ) : eZ\Publish\API\Repository\Values\ValueObject | ||
Результат | eZ\Publish\API\Repository\Values\ValueObject |
public iSetTheContentTypeHeaderToInVersion ( $contentType, $version ) |
protected makeObjectHeader ( $object ) |
protected setRestBodyType ( string $type ) | ||
$type | string | Type of the REST body |
public ValueObject,eZ\Publish\API\Repository\Values $requestObject | ||
Результат | eZ\Publish\API\Repository\Values\ValueObject |
public ValueObject,eZ\Publish\API\Repository\Values|Exception,eZ\Bundle\EzPublishRestBundle\Features\Context\SubContext $responseObject | ||
Результат | eZ\Publish\API\Repository\Values\ValueObject | |