PHP Class Pimcore\Tool\RestClient

Mostra file Open project: pimcore/pimcore

Protected Properties

Property Type Description
$apikey string
$baseUrl string
$condense boolean
$disableMappingExceptions boolean
$enableProfiling boolean
$host string
$loggingEnabled boolean
$testMode boolean

Public Methods

Method Description
__construct ( array $options = [] )
buildEndpointUrl ( $customUrlPath, array $params = [] ) : string
changeExtension ( $filename, $extension ) : string
createAsset ( $asset ) : mixed | null | string
createAssetFolder ( $assetFolder ) : mixed Creates a new asset folder.
createDocument ( $document ) : mixed Creates a new document.
createDocumentFolder ( $documentFolder ) : mixed Creates a new document folder.
createObjectConcrete ( $object ) : mixed Creates a new object.
createObjectFolder ( $objectFolder ) : mixed Creates a new object folder.
deleteAsset ( $assetId ) : mixed Delete asset.
deleteDocument ( $documentId ) : mixed Delete document.
deleteObject ( $objectId ) : mixed Delete object.
doRequest ( $uri, string $method = "GET", null $body = null ) : mixed | null | string
enableTestMode ( ) Enables the test mode. X-pimcore-unit-test-request=true header will be sent.
getApiKey ( ) : string
getAssetById ( $id, $decode = true, $idMapper = null, $light = false, $thumbnail = null, $tolerant = false, $protocol = "http://" )
getAssetCount ( null $condition = null, null $groupBy = null ) : mixed
getAssetList ( null $condition = null, null $order = null, null $orderKey = null, null $offset = null, null $limit = null, null $groupBy = null, boolean $decode = true ) : array
getBaseUrl ( ) : string
getClassById ( $id, boolean $decode = true ) : mixed | null | ClassDefinition | string
getClasses ( ) : mixed Returns a list of defined classes
getClient ( ) : Zend_Http_Client
getCondense ( ) : boolean
getCurrentTime ( ) : mixed Returns the current server time
getDisableMappingExceptions ( ) : boolean
getDocumentById ( $id, boolean $decode = true, null $idMapper = null ) : mixed
getDocumentCount ( null $condition = null, null $groupBy = null ) : mixed
getDocumentList ( null $condition = null, null $order = null, null $orderKey = null, null $offset = null, null $limit = null, null $groupBy = null, boolean $decode = true ) : array
getEnableProfiling ( ) : boolean
getFieldCollection ( $id ) : mixed | null | string
getFieldCollections ( ) : mixed | null | string
getHost ( ) : string
getImageThumbnail ( $id ) : mixed Returns the image thumbnail configuration with the given ID.
getImageThumbnails ( ) : mixed Returns a list of image thumbnail configurations.
getKeyValueDefinition ( ) : mixed Returns the key value definition
getLoggingEnabled ( ) : boolean
getObjectBrick ( $id ) : mixed Returns the given object brick definition
getObjectBricks ( ) : mixed Returns a list of defined object bricks
getObjectById ( $id, $decode = true, $idMapper = null )
getObjectCount ( null $condition = null, null $groupBy = null, null $objectClass = null ) : mixed
getObjectList ( null $condition = null, null $order = null, null $orderKey = null, null $offset = null, null $limit = null, null $groupBy = null, boolean $decode = true, null $objectClass = null ) : array
getObjectMetaById ( $id, boolean $decode = true ) : mixed | ClassDefinition
getProfilingInfo ( ) : mixed
getServerInfo ( ) : mixed Returns: server-info including pimcore version, current time and extension data.
getTestMode ( ) : boolean
getUser ( ) : mixed Returns the current user
setApiKey ( $apikey )
setBaseUrl ( $base )
setClient ( Zend_Http_Client $client )
setCondense ( $condense )
setDisableMappingExceptions ( $disableMappingExceptions )
setEnableProfiling ( $enableProfiling )
setHost ( $host )
setLoggingEnabled ( $loggingEnabled )
setTestMode ( $testMode )
setValue ( $key, $value )
setValues ( array $data = [] )

Private Methods

Method Description
fillParms ( null $condition = null, null $order = null, null $orderKey = null, null $offset = null, null $limit = null, null $groupBy = null, null $objectClass = null ) : string
fillWebserviceData ( $class, $data ) : mixed
map ( $wsData, $data ) : mixed

Method Details

__construct() public method

public __construct ( array $options = [] )
$options array

buildEndpointUrl() public method

public buildEndpointUrl ( $customUrlPath, array $params = [] ) : string
$customUrlPath
$params array
return string

changeExtension() public method

public changeExtension ( $filename, $extension ) : string
$filename
$extension
return string

createAsset() public method

public createAsset ( $asset ) : mixed | null | string
$asset
return mixed | null | string

createAssetFolder() public method

Creates a new asset folder.
public createAssetFolder ( $assetFolder ) : mixed
$assetFolder document folder.
return mixed

createDocument() public method

Creates a new document.
public createDocument ( $document ) : mixed
$document
return mixed json encoded success value and id

createDocumentFolder() public method

Creates a new document folder.
public createDocumentFolder ( $documentFolder ) : mixed
return mixed

createObjectConcrete() public method

Creates a new object.
public createObjectConcrete ( $object ) : mixed
$object
return mixed json encoded success value and id

createObjectFolder() public method

Creates a new object folder.
public createObjectFolder ( $objectFolder ) : mixed
$objectFolder object folder.
return mixed

deleteAsset() public method

Delete asset.
public deleteAsset ( $assetId ) : mixed
$assetId
return mixed json encoded success value and id

deleteDocument() public method

Delete document.
public deleteDocument ( $documentId ) : mixed
$documentId
return mixed json encoded success value and id

deleteObject() public method

Delete object.
public deleteObject ( $objectId ) : mixed
$objectId
return mixed json encoded success value and id

doRequest() public method

public doRequest ( $uri, string $method = "GET", null $body = null ) : mixed | null | string
$uri
$method string
$body null
return mixed | null | string

enableTestMode() public method

Enables the test mode. X-pimcore-unit-test-request=true header will be sent.
public enableTestMode ( )

getApiKey() public method

public getApiKey ( ) : string
return string

getAssetById() public method

public getAssetById ( $id, $decode = true, $idMapper = null, $light = false, $thumbnail = null, $tolerant = false, $protocol = "http://" )

getAssetCount() public method

public getAssetCount ( null $condition = null, null $groupBy = null ) : mixed
$condition null
$groupBy null
return mixed

getAssetList() public method

public getAssetList ( null $condition = null, null $order = null, null $orderKey = null, null $offset = null, null $limit = null, null $groupBy = null, boolean $decode = true ) : array
$condition null
$order null
$orderKey null
$offset null
$limit null
$groupBy null
$decode boolean
return array

getBaseUrl() public method

public getBaseUrl ( ) : string
return string

getClassById() public method

public getClassById ( $id, boolean $decode = true ) : mixed | null | ClassDefinition | string
$id
$decode boolean
return mixed | null | Pimcore\Model\Object\ClassDefinition | string

getClasses() public method

Returns a list of defined classes
public getClasses ( ) : mixed
return mixed

getClient() public method

public getClient ( ) : Zend_Http_Client
return Zend_Http_Client

getCondense() public method

public getCondense ( ) : boolean
return boolean

getCurrentTime() public method

Returns the current server time
public getCurrentTime ( ) : mixed
return mixed

getDisableMappingExceptions() public method

getDocumentById() public method

public getDocumentById ( $id, boolean $decode = true, null $idMapper = null ) : mixed
$id
$decode boolean
$idMapper null
return mixed

getDocumentCount() public method

public getDocumentCount ( null $condition = null, null $groupBy = null ) : mixed
$condition null
$groupBy null
return mixed

getDocumentList() public method

public getDocumentList ( null $condition = null, null $order = null, null $orderKey = null, null $offset = null, null $limit = null, null $groupBy = null, boolean $decode = true ) : array
$condition null
$order null
$orderKey null
$offset null
$limit null
$groupBy null
$decode boolean
return array

getEnableProfiling() public method

public getEnableProfiling ( ) : boolean
return boolean

getFieldCollection() public method

public getFieldCollection ( $id ) : mixed | null | string
$id
return mixed | null | string

getFieldCollections() public method

public getFieldCollections ( ) : mixed | null | string
return mixed | null | string

getHost() public method

public getHost ( ) : string
return string

getImageThumbnail() public method

Returns the image thumbnail configuration with the given ID.
public getImageThumbnail ( $id ) : mixed
$id
return mixed

getImageThumbnails() public method

Returns a list of image thumbnail configurations.
public getImageThumbnails ( ) : mixed
return mixed

getKeyValueDefinition() public method

Returns the key value definition
public getKeyValueDefinition ( ) : mixed
return mixed

getLoggingEnabled() public method

public getLoggingEnabled ( ) : boolean
return boolean

getObjectBrick() public method

Returns the given object brick definition
public getObjectBrick ( $id ) : mixed
$id
return mixed

getObjectBricks() public method

Returns a list of defined object bricks
public getObjectBricks ( ) : mixed
return mixed

getObjectById() public method

public getObjectById ( $id, $decode = true, $idMapper = null )

getObjectCount() public method

public getObjectCount ( null $condition = null, null $groupBy = null, null $objectClass = null ) : mixed
$condition null
$groupBy null
$objectClass null
return mixed

getObjectList() public method

public getObjectList ( null $condition = null, null $order = null, null $orderKey = null, null $offset = null, null $limit = null, null $groupBy = null, boolean $decode = true, null $objectClass = null ) : array
$condition null
$order null
$orderKey null
$offset null
$limit null
$groupBy null
$decode boolean
$objectClass null
return array

getObjectMetaById() public method

public getObjectMetaById ( $id, boolean $decode = true ) : mixed | ClassDefinition
$id
$decode boolean
return mixed | Pimcore\Model\Object\ClassDefinition

getProfilingInfo() public method

public getProfilingInfo ( ) : mixed
return mixed

getServerInfo() public method

Returns: server-info including pimcore version, current time and extension data.
public getServerInfo ( ) : mixed
return mixed

getTestMode() public method

public getTestMode ( ) : boolean
return boolean

getUser() public method

Returns the current user
public getUser ( ) : mixed
return mixed

setApiKey() public method

public setApiKey ( $apikey )
$apikey

setBaseUrl() public method

public setBaseUrl ( $base )
$base

setClient() public method

public setClient ( Zend_Http_Client $client )
$client Zend_Http_Client

setCondense() public method

public setCondense ( $condense )
$condense

setDisableMappingExceptions() public method

public setDisableMappingExceptions ( $disableMappingExceptions )
$disableMappingExceptions

setEnableProfiling() public method

public setEnableProfiling ( $enableProfiling )
$enableProfiling

setHost() public method

public setHost ( $host )
$host

setLoggingEnabled() public method

public setLoggingEnabled ( $loggingEnabled )
$loggingEnabled

setTestMode() public method

public setTestMode ( $testMode )
$testMode

setValue() public method

public setValue ( $key, $value )
$key
$value

setValues() public method

public setValues ( array $data = [] )
$data array

Property Details

$apikey protected_oe property

protected string $apikey
return string

$baseUrl protected_oe property

protected string $baseUrl
return string

$condense protected_oe property

protected bool $condense
return boolean

$disableMappingExceptions protected_oe property

protected bool $disableMappingExceptions
return boolean

$enableProfiling protected_oe property

protected bool $enableProfiling
return boolean

$host protected_oe property

protected string $host
return string

$loggingEnabled protected_oe property

protected bool $loggingEnabled
return boolean

$testMode protected_oe property

protected bool $testMode
return boolean