function SAPE_articles($options = null) { parent::SAPE_base($options); if (is_array($options) && isset($options['headers_enabled'])) { $this->_headers_enabled = $options['headers_enabled']; } // Кодировка if (isset($options['charset']) && strlen($options['charset'])) { $this->_charset = $options['charset']; } else { $this->_charset = ''; } $this->_get_index(); if (!empty($this->_data['index']['announcements_delimiter'])) { $this->_announcements_delimiter = $this->_data['index']['announcements_delimiter']; } if (!empty($this->_data['index']['charset']) and !(isset($options['charset']) && strlen($options['charset']))) { $this->_charset = $this->_data['index']['charset']; } if (is_array($options)) { if (isset($options['host'])) { $host = $options['host']; } } elseif (strlen($options)) { $host = $options; $options = array(); } if (isset($host) && strlen($host)) { $this->_real_host = $host; } else { $this->_real_host = $_SERVER['HTTP_HOST']; } if (!isset($this->_data['index']['announcements'][$this->_request_uri])) { $this->_correct_uri(); } }
function SAPE_context($options = null) { parent::SAPE_base($options); $this->load_data(); }