Свойство | Тип | Описание | |
---|---|---|---|
$additionalHeaders | |||
$body | string | Posted content for methods that require it | |
$client | |||
$contentType | string | Request content-type | |
$credentials | PHPCR\CredentialsInterface | Set of credentials necessary to connect to the server or else. | |
$curl | Jackalope\Transport\Jackrabbit\curl | ||
$depth | integer | How far the request should go, default is 0 | |
$errorHandlingMode | boolean | Whether we are in error handling mode to prevent infinite recursion | |
$lockToken | string | FALSE | The lock token active for this request otherwise FALSE for no locking | |
$method | string | Name of the request method to be used. | |
$uri | array | . | |
$versionChecked | boolean | Doing this once per php process is enough. |
Метод | Описание | |
---|---|---|
__construct ( Jackalope\FactoryInterface $factory, |
Initiaties the NodeTypes request object. | |
addCurlOptions ( array $options ) | Add curl-options for this request. | |
addHeader ( string $header ) | add an additional http header | |
addUserData ( string $userData ) | Add the user data header | |
execute ( boolean $getCurlObject = false, boolean $forceMultiple = false ) : string | Jackalope\Transport\Jackrabbit\curl | array | Requests the data to be identified by a formerly prepared request. | |
executeDom ( boolean $forceMultiple = false ) : DOMDocument | Loads the response into an DOMDocument. | |
executeJson ( boolean $forceMultiple = false ) : mixed | Loads the server response as a json string. | |
forceHttpVersion10 ( ) | Force curl to use HTTP version 1.0 | |
setBody ( string $body ) | Set the request body | |
setContentType ( string $contentType ) | Set a different content type for this request. The default is text/xml in utf-8 | |
setCredentials ( PHPCR\CredentialsInterface $creds = null ) | Set the credentials for the request. Setting them to null will make a request without authentication header. | |
setDepth ( integer | string $depth ) | Set the depth to which nodes should be fetched. | |
setLockToken ( string $lockToken ) | Set the transaction lock token to be used with this request | |
setMethod ( string $method ) | Set or update the HTTP method to be used in this request. | |
setUri ( string | array $uri ) |
Метод | Описание | |
---|---|---|
getLongErrorString ( Jackalope\Transport\Jackrabbit\curl $curl, string $response ) : string | returns a longer error string to be used in generic exceptions | |
getShortErrorString ( ) : string | returns a shorter error string to be used in exceptions | |
handleError ( Jackalope\Transport\Jackrabbit\curl $curl, string $response, integer $httpCode ) | Handles errors caused by singleRequest and multiRequest | |
multiRequest ( boolean $getCurlObject = false ) : array | Requests the data for multiple requests | |
prepareCurl ( Jackalope\Transport\Jackrabbit\curl $curl, boolean $getCurlObject ) | used by multiCurl with fresh curl instances | |
singleRequest ( boolean $getCurlObject ) : string | Jackalope\Transport\Jackrabbit\curl | Requests the data for a single requests |
public __construct ( Jackalope\FactoryInterface $factory, |
||
$factory | Jackalope\FactoryInterface | Ignored for now, as this class does not create objects |
$client | The jackrabbit client instance | |
$curl | Jackalope\Transport\Jackrabbit\curl | The cURL object to use in this request |
$method | string | the HTTP method to use, one of the class constants |
$uri | string | array | the remote url for this request, including protocol, host name, workspace and path to the object to manipulate. May be an array of uri |
public addCurlOptions ( array $options ) | ||
$options | array |
public addUserData ( string $userData ) | ||
$userData | string |
public execute ( boolean $getCurlObject = false, boolean $forceMultiple = false ) : string | Jackalope\Transport\Jackrabbit\curl | array | ||
$getCurlObject | boolean | wheter to return the curl object instead of the response |
$forceMultiple | boolean | whether to force parallel requests or not |
Результат | string | Jackalope\Transport\Jackrabbit\curl | array | response string or the curl object. |
public executeDom ( boolean $forceMultiple = false ) : DOMDocument | ||
$forceMultiple | boolean | whether to force parallel requests or not |
Результат | DOMDocument | The loaded XML response text. |
public executeJson ( boolean $forceMultiple = false ) : mixed | ||
$forceMultiple | boolean | whether to force parallel requests or not |
Результат | mixed |
public forceHttpVersion10 ( ) |
protected getLongErrorString ( Jackalope\Transport\Jackrabbit\curl $curl, string $response ) : string | ||
$curl | Jackalope\Transport\Jackrabbit\curl | The curl object |
$response | string | the response body |
Результат | string | the error message |
protected getShortErrorString ( ) : string | ||
Результат | string | the error message |
protected handleError ( Jackalope\Transport\Jackrabbit\curl $curl, string $response, integer $httpCode ) | ||
$curl | Jackalope\Transport\Jackrabbit\curl | |
$response | string | the response body |
$httpCode | integer | the http response code |
protected multiRequest ( boolean $getCurlObject = false ) : array | ||
$getCurlObject | boolean | whether to return the curl object instead of the response |
Результат | array | of XML representations of responses or curl objects. |
protected prepareCurl ( Jackalope\Transport\Jackrabbit\curl $curl, boolean $getCurlObject ) | ||
$curl | Jackalope\Transport\Jackrabbit\curl | |
$getCurlObject | boolean | whether to return the curl object instead of the response |
public setContentType ( string $contentType ) | ||
$contentType | string |
public setCredentials ( PHPCR\CredentialsInterface $creds = null ) | ||
$creds | PHPCR\CredentialsInterface | the credentials to use in the request. |
public setLockToken ( string $lockToken ) | ||
$lockToken | string | the transaction lock |
protected singleRequest ( boolean $getCurlObject ) : string | Jackalope\Transport\Jackrabbit\curl | ||
$getCurlObject | boolean | whether to return the curl object instead of the response |
Результат | string | Jackalope\Transport\Jackrabbit\curl | XML representation of a response or curl object. |
protected string $body | ||
Результат | string |
protected Client,Jackalope\Transport\Jackrabbit $client | ||
Результат |
protected string $contentType | ||
Результат | string |
protected CredentialsInterface,PHPCR $credentials | ||
Результат | PHPCR\CredentialsInterface |
protected curl,Jackalope\Transport\Jackrabbit $curl | ||
Результат | Jackalope\Transport\Jackrabbit\curl |
protected int $depth | ||
Результат | integer |
protected bool $errorHandlingMode | ||
Результат | boolean |
protected string|FALSE $lockToken | ||
Результат | string | FALSE |
protected string $method | ||
Результат | string |
protected static bool $versionChecked | ||
Результат | boolean |