コード例 #1
0
ファイル: Opensearch.php プロジェクト: mined-gatech/framework
 /**
  * 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;
         }
     }
 }
コード例 #2
0
ファイル: Json.php プロジェクト: mined-gatech/framework
 /**
  * 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';
 }
コード例 #3
0
ファイル: Error.php プロジェクト: mined-gatech/framework
 /**
  * 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';
 }
コード例 #4
0
ファイル: Xml.php プロジェクト: mined-gatech/framework
 /**
  * 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';
 }
コード例 #5
0
ファイル: Html.php プロジェクト: mined-gatech/hubzero-cms
 /**
  * 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');
 }
コード例 #6
0
ファイル: Feed.php プロジェクト: mined-gatech/hubzero-cms
 /**
  * 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';
 }