Class shardimage\shardimagephp\services\ImageService

Inheritanceshardimage\shardimagephp\services\ImageService » shardimage\shardimagephp\services\Service » shardimage\shardimagephpapi\base\BaseObject

Shardimage image service.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$client shardimage\shardimagephp\auth\Client Shardimage API Client shardimage\shardimagephp\services\Service
$lastError mixed Last error in the service shardimage\shardimagephp\services\Service
$version string Shardimage module version shardimage\shardimagephp\services\Service

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates the service. shardimage\shardimagephp\services\Service
__get() Returns the value of a non-defined property, it there is a getter method. shardimage\shardimagephpapi\base\BaseObject
__isset() Does the non-defined property with a getter exist and is it not NULL? shardimage\shardimagephpapi\base\BaseObject
__set() Sets the value of a non-defined property, if there is a setter method. shardimage\shardimagephpapi\base\BaseObject
__unset() Sets the value of a non-defined property to NULL, if there is a setter. shardimage\shardimagephpapi\base\BaseObject
delete() Deletes an image. shardimage\shardimagephp\services\ImageService
deleteByTag() Deletes images by tag. shardimage\shardimagephp\services\ImageService
exists() Returns whether an image exists. shardimage\shardimagephp\services\ImageService
getController() Shardimage controller shardimage\shardimagephp\services\ImageService
getLastError() Returns the last error in the service. shardimage\shardimagephp\services\Service
getModule() Shardimage module shardimage\shardimagephp\services\ImageService
index() Fetches all images. shardimage\shardimagephp\services\ImageService
rename() Renames the ID of an image. shardimage\shardimagephp\services\ImageService
toArray() Converts the object an array. shardimage\shardimagephpapi\base\BaseObject
view() Fetches an image. shardimage\shardimagephp\services\ImageService

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
ensureClass() Creates an object from the given parameters. shardimage\shardimagephpapi\base\BaseObject
init() Custom initialization. shardimage\shardimagephpapi\base\BaseObject
sendRequest() Sends the request to the Shardimage API and returns with the Response object or the ID for the request if deferred. shardimage\shardimagephp\services\Service

Method Details

delete() public method

Deletes an image.

public boolean delete ( $params, $optParams = [] )
$params array

Required API parameters

  • cloudId - cloud ID
  • publicId - image ID
  • $optParams array

    Optional API parameters

    deleteByTag() public method

    Deletes images by tag.

    public shardimage\shardimagephp\models\job\Job|shardimage\shardimagephpapi\api\Response deleteByTag ( $params, $optParams = [] )
    $params array

    Required API parameters

  • cloudId - cloud ID
  • tag - image tag
  • $optParams array

    Optional API parameters

    exists() public method

    Returns whether an image exists.

    public boolean exists ( $params, $optParams = [] )
    $params array

    Required API parameters

  • cloudId - cloud ID
  • publicId - image ID
  • $optParams array

    Optional API parameters

    getController() public static method

    Shardimage controller

    public static void getController ( )
    getModule() public static method

    Shardimage module

    public static void getModule ( )
    index() public method

    Fetches all images.

    public shardimage\shardimagephp\models\image\Index index ( $params = [], $optParams = [] )
    $params array

    Required API parameters

  • cloudId - cloud ID
  • $optParams shardimage\shardimagephp\models\image\IndexParams|array

    Optional API parameters

  • projection - an array of projection flags: noExif, noObject, noDimensions
  • order - the order of results: latest, publicId
  • maxResults - number of results
  • nextPageToken - token for next result page
  • nextPageTokenType - type of paging token: shortTime, longTime
  • prefix - prefix of publicId for filtering
  • byTag - image tag for filtering
  • rename() public method

    Renames the ID of an image.

    public shardimage\shardimagephp\models\image\Image|shardimage\shardimagephpapi\api\Response rename ( $params, $optParams = [] )
    $params array

    Required API parameters

  • cloudId - cloud ID
  • publicId - image ID
  • newPublicId - new image ID
  • $optParams array

    Optional API parameters

    view() public method

    Fetches an image.

    public shardimage\shardimagephp\models\image\Image|shardimage\shardimagephpapi\api\Response view ( $params, $optParams = [] )
    $params array

    Required API parameters

  • cloudId - cloud ID
  • publicId - image ID
  • $optParams \shardimage\shardimagephp\services\ImageViewParams|array

    Optional API parameters

  • projection - an array of projection flags: noExif, noObject, noDimensions