当前位置: 首页>>代码示例>>PHP>>正文


PHP XML::__construct方法代码示例

本文整理汇总了PHP中XML::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP XML::__construct方法的具体用法?PHP XML::__construct怎么用?PHP XML::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XML的用法示例。


在下文中一共展示了XML::__construct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($db, $settings, $page)
 {
     parent::__construct($db);
     $this->settings = $settings;
     $this->page = $page;
     if ($this->page->ajax_request) {
         $this->mode = "xml";
         $this->add_layout_data = false;
     } else {
         if (isset($_GET["output"])) {
             if (($this->mode = $_GET["output"]) == "raw") {
                 $this->mode = "xml";
             } else {
                 $this->add_layout_data = false;
             }
         }
     }
     $this->language = $this->settings->default_language;
     $this->description = $this->settings->head_description;
     $this->set_layout();
     /* Mobile devices
      */
     $mobiles = array("iPhone", "Android");
     foreach ($mobiles as $mobile) {
         if (strpos($_SERVER["HTTP_USER_AGENT"], $mobile) !== false) {
             $this->mobile = true;
         }
     }
 }
开发者ID:shannara,项目名称:banshee,代码行数:29,代码来源:output.php

示例2: __construct

 /**
  * Instantiates an RSS Encoder.
  * 
  * @param array 	$channelElements 	An assosiative array of channel elements. Per RSS
  *                                	 	specification: title, link, and description are
  *                                	 	required. "element" => "value"
  * @param array 	$itemElements    	An array of elements to include in each data item;
  *                                 		for example, title, link, author, etc...
  * @param array 	$data            	An array of items in the feed
  * @param array  	$dataMap         	An associative array mapping fields in the items
  *                                  	passed $data array to RSS-specific fields.
  *                                  	"UserField" => "RSSField"
  *                                  	For example:
  *                                  	$dataMap = array(
  *                                  		"published" => "pubDate",
  *                                  		"body" => "description"
  *                                  	);
  */
 public function __construct($channelElements, $itemElements, $data, $dataMap = array())
 {
     parent::__construct($data);
     $this->channelElements = $channelElements;
     $this->itemElements = $itemElements;
     $this->dataMap = $dataMap;
     $this->setupFeed();
 }
开发者ID:jenwachter,项目名称:data-encoder,代码行数:26,代码来源:RSS.php

示例3: __construct

 public function __construct($name, $url, $title, $img, $author)
 {
     $this->url = $url;
     $this->title = $title;
     $this->img = $img;
     $this->author = $author;
     $date = new \DateTime();
     $this->date = $date->format('Y-m-d\\TH:i:s\\Z');
     $this->initEntries();
     parent::__construct($name, 'xml version="1.0" encoding="utf-8"');
 }
开发者ID:kazuohirai,项目名称:awayfromswag,代码行数:11,代码来源:RSS.php

示例4: __construct

 /**
  * Class constructor initiates parent class and sends all the
  * required parameters to the parent
  */
 public function __construct()
 {
     parent::__construct(Configuration::getXMLPath() . $this->xml_file);
 }
开发者ID:rawntech-rohan,项目名称:Project-CJ,代码行数:8,代码来源:DomainNames.constants.php


注:本文中的XML::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。