/** * @param array $contents * @param RequestSource $source */ public function __construct($contents = array(), $source = null) { // Set the request type properly... if (null === $source && PHP_SAPI == 'cli') { $this->_source = static::Cli; } parent::__construct($contents); }
/** * Create the service * * @param ConsumerLike $consumer * @param array $settings */ public function __construct(ConsumerLike $consumer, $settings = array()) { parent::__construct($settings); $this->_consumer = $consumer; $this->_state = self::Initialized; }