Class shardimage\shardimagephp\services\UrlService

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

Shardimage URL generator 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
create() Creates the URL for an internal image. shardimage\shardimagephp\services\UrlService
createCloudinary() Creates the URL for a Cloudinary image. shardimage\shardimagephp\services\UrlService
createFacebook() Creates the URL for a Facebook profile picture. shardimage\shardimagephp\services\UrlService
createRemote() Creates the URL for a remote image. shardimage\shardimagephp\services\UrlService
createTwitter() Creates the URL for a Twitter profile picture. shardimage\shardimagephp\services\UrlService
createWikimedia() Creates the URL for a Wikimedia commons image. shardimage\shardimagephp\services\UrlService
createYoutube() Creates the URL for a YouTube video preview image. shardimage\shardimagephp\services\UrlService
getController() Shardimage controller shardimage\shardimagephp\services\UrlService
getLastError() Returns the last error in the service. shardimage\shardimagephp\services\Service
getModule() Shardimage module shardimage\shardimagephp\services\UrlService
toArray() Converts the object an array. shardimage\shardimagephpapi\base\BaseObject

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

create() public method

Creates the URL for an internal image.

public string create ( $params, $optParams = [] )
$params array|string

Required API parameters

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

    Optional API parameters

                        <li>option - options defined by shardimage\shardimagephp\factories\Option
                        <li>transformation - transformations defined by shardimage\shardimagephp\factories\Transformation
                        <li>version - version number (to force cache miss)
                        <li>format - output format
                        <li>seo - SEO filename
                        <li>security - "basic" or "token"
    
    createCloudinary() public method

    Creates the URL for a Cloudinary image.

    public string createCloudinary ( $params, $optParams = [] )
    $params array

    Required API parameters

  • cloudId - cloud ID
  • cloudinaryCloud - Cloudinary cloud ID + folder
  • cloudinaryImage - Cloudinary image ID
  • $optParams array

    Optional API parameters

                        <li>option - options defined by shardimage\shardimagephp\factories\Option
                        <li>transformation - transformations defined by shardimage\shardimagephp\factories\Transformation
                        <li>version - version number (to force cache miss)
                        <li>format - output format
                        <li>seo - SEO filename
                        <li>security - "basic" or "token"
    
    createFacebook() public method

    Creates the URL for a Facebook profile picture.

    public string createFacebook ( $params, $optParams = [] )
    $params array|string

    Required API parameters

  • cloudId - cloud ID
  • facebookId - Facebook user ID
  • $optParams array

    Optional API parameters

                        <li>option - options defined by shardimage\shardimagephp\factories\Option
                        <li>transformation - transformations defined by shardimage\shardimagephp\factories\Transformation
                        <li>version - version number (to force cache miss)
                        <li>format - output format
                        <li>seo - SEO filename
                        <li>security - "basic" or "token"
    
    createRemote() public method

    Creates the URL for a remote image.

    public string createRemote ( $params, $optParams = [] )
    $params array|string

    Required API parameters

  • cloudId - cloud ID
  • url - image URL
  • $optParams array

    Optional API parameters

                        <li>option - options defined by shardimage\shardimagephp\factories\Option
                        <li>transformation - transformations defined by shardimage\shardimagephp\factories\Transformation
                        <li>version - version number (to force cache miss)
                        <li>format - output format
                        <li>seo - SEO filename
                        <li>security - "basic" or "token"
    
    createTwitter() public method

    Creates the URL for a Twitter profile picture.

    public string createTwitter ( $params, $optParams = [] )
    $params array|string

    Required API parameters

  • cloudId - cloud ID
  • twitterId - Twitter user ID
  • $optParams array

    Optional API parameters

                        <li>option - options defined by shardimage\shardimagephp\factories\Option
                        <li>transformation - transformations defined by shardimage\shardimagephp\factories\Transformation
                        <li>version - version number (to force cache miss)
                        <li>format - output format
                        <li>seo - SEO filename
                        <li>security - "basic" or "token"
    
    createWikimedia() public method

    Creates the URL for a Wikimedia commons image.

    public string createWikimedia ( $params, $optParams = [] )
    $params array|string

    Required API parameters

  • cloudId - cloud ID
  • wikimediaImage - Wikimedia image URL
  • $optParams array

    Optional API parameters

                        <li>option - options defined by shardimage\shardimagephp\factories\Option
                        <li>transformation - transformations defined by shardimage\shardimagephp\factories\Transformation
                        <li>version - version number (to force cache miss)
                        <li>format - output format
                        <li>seo - SEO filename
                        <li>security - "basic" or "token"
    
    createYoutube() public method

    Creates the URL for a YouTube video preview image.

    public string createYoutube ( $params, $optParams = [] )
    $params array|string

    Required API parameters

  • cloudId - cloud ID
  • youtubeId - YouTube video ID
  • $optParams array

    Optional API parameters

                        <li>option - options defined by shardimage\shardimagephp\factories\Option
                        <li>transformation - transformations defined by shardimage\shardimagephp\factories\Transformation
                        <li>version - version number (to force cache miss)
                        <li>format - output format
                        <li>seo - SEO filename
                        <li>security - "basic" or "token"
    
    getController() public static method

    Shardimage controller

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

    Shardimage module

    public static void getModule ( )