/** * Set the authorization parameters * @param string $username * @param string $password * @return App */ public function setAuth($username, $password) { $this->client = new Client(); $this->client->setUsername($username); $this->client->setPassword($password); $this->_hash = sha1($username . $password); return $this; }
/** * Creates a new instance of Client * @param array $options * @return Client */ public function createFromArray($options) { $instance = new Client(); $instance->setNetworkId($options['networkId']); $instance->setApiUrl($options['url']); $instance->setLogin($options['login']); $instance->setPassword($options['password']); return $instance; }