function CoreRss() { CoreBase::CoreBase(); global $permarr; $this->permarr = $permarr; $this->db_config = $db_config =& new db_config(); }
/** * Constructor * * Get data from database (if $data is integer) or from array. * * @param mixed $data * * @access public */ public function __construct(&$data = null) { parent::__construct(); if (is_array($data)) { $this->setFromArray($data); } elseif (is_int($data)) { $this->setFromDB($data); } }
function Comment($id = null) { CoreBase::CoreBase(); //wywolujemy konstruktora klasy bazowej if (!is_null($id) && $this->_id_check($id)) { $this->set_id($id); $this->set_from_array($this->retrieve()); } return true; }
/** * @param $id - id */ function Comments($id = null) { // konstruktor klasy bazowej CoreBase::CoreBase(); if (!is_null($id) && $this->_id_check($id)) { $this->set_id($id_news); $this->set_from_array($this->retrieve()); } return true; }
/** * Constructor * * Creates prepared statements with acquire bindings. * * @access public */ public function __construct() { parent::__construct(); $query = sprintf("\n SELECT\n `value`\n FROM\n %s\n WHERE\n `key` = :k", TBL_CONFIG); $this->stmtGet = $this->db->prepare($query); $query = sprintf("\n UPDATE\n %s\n SET\n `value` = :v\n WHERE\n `key` = :k", TBL_CONFIG); $this->stmtSet = $this->db->prepare($query); $query = sprintf("\n INSERT INTO\n %s\n SET\n `key` = :k,\n `value = :v", TBL_CONFIG); $this->stmtInsert = $this->db->prepare($query); }
/** * @param $id_news - news id */ function Rss($id_news = null) { // konstruktor klasy bazowej CoreBase::CoreBase(); if (!is_null($id_news) && $this->_id_check($id_news)) { $this->set_id($id_news); $data = $this->retrieve(); $data['published'] = $data['published'] == 1; $data['comments_allow'] = $data['comments_allow'] == 1; $this->set_from_array($data); } return true; }
function Image($filepath = null) { CoreBase::CoreBase(); $sessVarName = $this->get_sessVarName(); if (!is_null($filepath)) { $this->set_data_from_file($filepath); unset($_SESSION[$sessVarName]); } elseif (isset($_SESSION[$sessVarName])) { $filepath = pathjoin($this->get_tmp_dir(), $_SESSION[$sessVarName]); if (is_file($filepath)) { $this->set_data_from_file($filepath); } else { $this->error_set(sprintf('Image::Image: _SESSION[\'%s\'] set, but file "%s" missing.', $sessVarName, $filename)); } } }
/** * Constructor * * Merge $base_properties, $base_getExternal and $base_setExternal with * parents. * * @access public */ public function __construct() { parent::__construct(); }
function __construct() { parent::__construct(); $this->views = new CoreViewsLoader($this); $this->models = new CoreModelsLoader(); }
/** * Constructor * * Initialize database connection. */ public function __construct() { self::$db = CoreDB::init(); }
/** * Constructor * * Merge $base_properties, $base_getExternal and $base_setExternal with * parents. * * @access public */ public function __construct() { parent::__construct(); self::$base_properties = array_merge(parent::$base_properties, self::$base_properties); self::$base_setExternal = array_merge(parent::$base_setExternal, self::$base_setExternal); self::$base_getExternal = array_merge(parent::$base_getExternal, self::$base_getExternal); }
/** * Constructor * * Load posts meta data from array or from database * * @param string $type type of meta data stored in db * @param mixed $data * * @access public */ public function __construct($type, $data = null) { parent::__construct(); $this->type = ucfirst(strtolower($type)); if (is_int($data)) { $this->setFromDB($data); } elseif (is_array($data)) { $this->setFromArray($data); } self::$stmt[self::ST_DB] = self::$db->prepare(sprintf("\n REPLACE\n %s\n SET\n `value` = :value,\n `key` = :key,\n `id_entry` = :id_entry,\n `type` = :type", TBL_META)); self::$stmt[self::ST_DEL] = self::$db->prepare(sprintf("\n DELETE FROM\n %s\n WHERE\n `key` = :key\n AND\n id_entry = :id_entry\n AND\n `type` = :type", TBL_META)); }