public static function retrieve($data) { $SQL = "SELECT account_id,user_name,password,first_name,last_name,token from account where account_id='" . $data->id . "'"; $res = pg_query($SQL) or die("read failed:" . $SQL); $row = pg_fetch_array($res); $a = new Account(); $a->id = $row[0]; $a->userName = $row[1]; $a->password = $row[2]; $a->firstName = $row[3]; $a->lastName = $row[4]; $a->token = $row[5]; $a->collections = Collection::retrieve((object) array("accountId" => $a->id)); return $a; }
public function __construct($params) { $this->collections = Collection::retrieve($params); $this->collection = $this->collections[0]; if (!isset($this->collection)) { throw new Exception("failed to find collection for"); } if (isset($params->pageLimit)) { $this->pageLimit = $params->pageLimit; } else { $this->pageLimit = 1500; } $this->processURLs = array(); $this->seenURLS = array(); $this->foundURLs = array(); $this->crawledURLs = array(); $this->startUrl = $this->collection->startUrl; $this->httpClient = new HTTPClient(); }
public function __construct($params) { $this->collections = Collection::retrieve($params); $this->collection = $this->collections[0]; }