Example #1
0
 /**
  * Constructor
  *
  * @param array  $options The service options array
  * @param object $req     The request object
  *
  * @throws Services_ShortURL_Exception_InvalidOptions
  * @return Services_ShortURL_Digg
  */
 public function __construct(array $options = array(), HTTP_Request2 $req = null)
 {
     parent::__construct($options, $req);
     if (!isset($this->options['appkey'])) {
         throw new Services_ShortURL_Exception_InvalidOptions('An appkey is required for Digg');
     }
 }
Example #2
0
 /**
  * Constructor
  *
  * @param array  $options The service options array
  * @param object $req     The request object 
  *
  * @throws {@link Services_ShortURL_Exception_InvalidOptions}
  * @return void
  */
 public function __construct(array $options = array(), HTTP_Request2 $req = null)
 {
     parent::__construct($options, $req);
     if (!isset($this->options['login'])) {
         throw new Services_ShortURL_Exception_InvalidOptions('A login is required for bit.ly');
     }
     if (!isset($this->options['apiKey'])) {
         throw new Services_ShortURL_Exception_InvalidOptions('An apiKey is required for bit.ly');
     }
     if (!isset($this->options['domain'])) {
         $this->options['domain'] = 'bit.ly';
     }
 }
Example #3
0
 /**
  * Constructor
  *
  * @param array  $options The service options array
  * @param object $req     The request object
  */
 public function __construct(array $options = array(), HTTP_Request2 $req = null)
 {
     parent::__construct($options, $req);
 }