Public Member Functions | Protected Member Functions | Protected Attributes

Robo47_Application_Resource_Service_Bitly Class Reference

List of all members.

Public Member Functions

 getService ()
 init ()

Protected Member Functions

 _setupService ($options)

Protected Attributes

 $_service = null

Detailed Description

Definition at line 31 of file Bitly.php.


Member Function Documentation

Robo47_Application_Resource_Service_Bitly::_setupService ( options  )  [protected]
Parameters:
array $options
Returns:
Robo47_Service_Bitly

Definition at line 55 of file Bitly.php.

Referenced by init().

    {
        if (!isset($options['login'])) {
            $message = 'No login provided';
            throw new Robo47_Application_Resource_Exception($message);
        }

        if (!isset($options['apiKey'])) {
            $message = 'No apiKey provided';
            throw new Robo47_Application_Resource_Exception($message);
        }

        $bitly = new Robo47_Service_Bitly(
            $options['login'],
            $options['apiKey']
        );

        if (isset($options['format'])) {
            $bitly->setFormat($options['format']);
        }

        if (isset($options['resultFormat'])) {
            $bitly->setResultFormat($options['resultFormat']);
        }

        if (isset($options['callback'])) {
            $bitly->setCallback($options['callback']);
        }

        if (isset($options['version'])) {
            $bitly->setVersion($options['version']);
        }

        if (isset($options['registryKey'])) {
            Zend_Registry::set($options['registryKey'], $bitly);
        }

        return $bitly;
    }

Here is the caller graph for this function:

Robo47_Application_Resource_Service_Bitly::getService (  ) 
Returns:
Robo47_Service_Bitly

Definition at line 99 of file Bitly.php.

    {
        return $this->_service;
    }

Robo47_Application_Resource_Service_Bitly::init (  ) 

Definition at line 40 of file Bitly.php.

References _setupService().

    {
        if (!empty($this->_options)) {
            $this->_service = $this->_setupService($this->_options);
        } else {
            $message = 'Empty options in resource ' .
                'Robo47_Application_Resource_Service_Bitly.';
            throw new Robo47_Application_Resource_Exception($message);
        }
    }

Here is the call graph for this function:


Member Data Documentation

Robo47_Application_Resource_Service_Bitly::$_service = null [protected]

Definition at line 38 of file Bitly.php.


The documentation for this class was generated from the following file: