public function __construct(RESTApiResourceVideoFavorites $parent, array $params) { parent::__construct(); if (empty($params)) { return; } $this->parent = $parent; $this->fav_id = (int) $params[0]; }
public function __construct(RESTApiResourceKaraoke $parent, array $params) { parent::__construct(); $this->parent = $parent; if (empty($params)) { return; } $this->id = (int) $params[0]; $this->parent->setKaraokeId($this->id); }
public function __construct(RESTApiResourcePvr $parent, array $params) { parent::__construct(); $this->parent = $parent; if (empty($params)) { return; } $this->id = (int) $params[0]; $pvr = new \RemotePvr(); $recording = $pvr->getById($this->id); if (empty($recording)) { throw new RESTNotFound("Recording not found"); } $this->recording = $recording; }
public function __construct() { parent::__construct(); $this->fields_map = array_fill_keys(array('id', "ls", "status", "mac", "fname", "phone", "tariff_plan", "end_date", "account_balance"), true); }