public static function findByUsername($username) { $query = DB::connection()->prepare('SELECT * FROM Client WHERE username = :username LIMIT 1'); $query->execute(array('username' => $username)); $row = $query->fetch(); if ($row) { $client = Client::createClient($row); } return $client; }
/** * Designated initializer */ public static function init($token) { Behave::$client = Client::createClient(array('app_token' => $token)); // Behave::$client->getConfig()->set('curl.options', array(CURLOPT_VERBOSE, true)); }
public function createClient() { $input = Input::all(); return Client::createClient($input); }