/** * Class constructor * * @param array $options Associative array of options * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); // Set document type $this->_type = 'opensearch'; // Set mime type $this->_mime = 'application/opensearchdescription+xml'; // Add the URL for self updating $update = new Opensearch\Url(); $update->type = 'application/opensearchdescription+xml'; $update->rel = 'self'; $update->template = Route::_(Uri::getInstance()); $this->addUrl($update); // Add the favicon as the default image // Try to find a favicon by checking the template and root folder $app = Factory::getApplication(); $dirs = array(JPATH_THEMES . '/' . $app->getTemplate(), JPATH_BASE); foreach ($dirs as $dir) { if (file_exists($dir . '/favicon.ico')) { $path = str_replace(JPATH_BASE . '/', '', $dir); $path = str_replace('\\', '/', $path); $favicon = new Opensearch\Image(); $favicon->data = Uri::base() . $path . '/favicon.ico'; $favicon->height = '16'; $favicon->width = '16'; $favicon->type = 'image/vnd.microsoft.icon'; $this->addImage($favicon); break; } } }
/** * Class constructor * * @param array $options Associative array of options * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); // Set mime type $this->_mime = 'application/json'; // Set document type $this->_type = 'json'; }
/** * Class constructor * * @param array $options Associative array of attributes * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); // Set mime type $this->_mime = 'text/html'; // Set document type $this->_type = 'error'; }
/** * Class constructor * * @param array $options Associative array of options * * @since 12.1 */ public function __construct($options = array()) { parent::__construct($options); // Set mime type $this->_mime = 'image/png'; // Set document type $this->_type = 'image'; }
/** * Class constructor * * @param array $options Associative array of options * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); // Set document type $this->_type = 'html'; // Set default mime type and document metadata (meta data syncs with mime type by default) $this->setMimeEncoding('text/html'); }
/** * Class constructor * * @param array $options Associative array of options * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); // Set document type $this->_type = 'feed'; }