public function __construct($_owner, $_vk = null, $_facebook = null, $_twitter = null, $_gplus = null) { parent::__construct($_owner); $this->u_vk = $_vk === null ? null : (int) $_vk; $this->u_facebook = $_facebook === null ? null : (int) $_facebook; $this->u_twitter = $_twitter === null ? null : (int) $_twitter; $this->u_gplus = $_gplus === null ? null : (int) $_gplus; }
public function __construct(Collection $_owner, $_url, $_id = null) { parent::__construct($_owner); $this->l_id = $_id; $this->l_url = $_url; $this->l_keywords = array(); $this->l_keywordsWrap = new \common\Collection($this, $this->l_keywords); $this->l_social = new \social\Aggregator($this, $this->l_url); $this->update(); }
public function __construct(\feed\Item $_owner, \SimpleXMLElement $_item, $_id = null) { parent::__construct($_owner); $this->l_id = $_id; $this->l_categories = array(); $this->l_categoriesWrap = new \common\Collection($this, $this->l_categories); $this->l_files = array(); $this->l_filesWrap = new \common\Collection($this, $this->l_files); $this->update($_item); }
public function __construct(Collection $_owner, $_source) { parent::__construct($_owner); if ($_source instanceof \preview\Item) { $this->l_url = $_source->url; $this->l_assign($_source); if ($id = $this->invoke("observer\\Observer.database.query(1)", "INSERT INTO `record` (`url`, `title`, `description`, `image`, `social.vk`, `social.facebook`, `social.twitter`, `social.gplus`) VALUES (" . "'" . mysql_real_escape_string($this->url) . "', " . "'" . mysql_real_escape_string($this->l_title) . "', " . "'" . mysql_real_escape_string($this->l_description) . "', " . "'" . mysql_real_escape_string($this->l_image) . "', " . "'" . $this->l_social->vk . "', " . "'" . $this->l_social->facebook . "', " . "'" . $this->l_social->twitter . "', " . "'" . $this->l_social->gplus . "'" . ");")) { $this->l_id = (string) $id; } } else { if (is_array($_source)) { $this->l_id = $_source["id"]; $this->l_url = $_source["url"]; $this->l_title = $_source["title"]; $this->l_description = $_source["description"]; $this->l_image = $_source["image"]; $this->l_social = new \social\Data($this, $_source["social.vk"], $_source["social.facebook"], $_source["social.twitter"], $_source["social.gplus"]); } } }