/** * Class constructor * * @param array $options Associative array of options * @return void */ 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 Url(); $update->type = 'application/opensearchdescription+xml'; $update->rel = 'self'; $update->template = Route::url(\Request::current()); $this->addUrl($update); // Add the favicon as the default image // Try to find a favicon by checking the template and root folder $dirs = array(App::get('template')->path, PATH_ROOT); foreach ($dirs as $dir) { if (file_exists($dir . DS . 'favicon.ico')) { $path = str_replace(PATH_ROOT . DS, '', $dir); $path = str_replace('\\', '/', $path); $favicon = new Image(); $favicon->data = \Request::root() . $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 * @return void */ 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 * @return void */ 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 * @return void */ public function __construct($options = array()) { parent::__construct($options); // set mime type $this->_mime = 'application/xml'; // set document type $this->_type = 'xml'; }
/** * Class constructor * * @param array $options Associative array of options * @return void */ 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 * @return void */ public function __construct($options = array()) { parent::__construct($options); // set document type $this->_type = 'feed'; }