當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ViewableData::__construct方法代碼示例

本文整理匯總了PHP中ViewableData::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ViewableData::__construct方法的具體用法?PHP ViewableData::__construct怎麽用?PHP ViewableData::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ViewableData的用法示例。


在下文中一共展示了ViewableData::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($width, $height, $guid_embed_redline)
 {
     $this->width = $width;
     $this->height = $height;
     $this->guid_embed_redline = $guid_embed_redline;
     parent::__construct();
 }
開發者ID:helpfulrobot,項目名稱:groupdocs-groupdocs-comparison,代碼行數:7,代碼來源:Result.php

示例2: __construct

 /**
  * Instantiate a new customised ViewableData object
  *
  * @param ViewableData $originalObject
  * @param ViewableData $customisedObject
  */
 public function __construct(ViewableData $originalObject, ViewableData $customisedObject)
 {
     $this->original = $originalObject;
     $this->customised = $customisedObject;
     $this->original->setCustomisedObj($this);
     parent::__construct();
 }
開發者ID:SpiritLevel,項目名稱:silverstripe-framework,代碼行數:13,代碼來源:ViewableData_Customised.php

示例3:

 function __construct($name)
 {
     parent::__construct();
     if (preg_match('/^(\\w+)$/i', $name, $match)) {
         $this->Name = $match[1];
     }
 }
開發者ID:alapini,項目名稱:silverstripe-dbplumber,代碼行數:7,代碼來源:DBP_Table.php

示例4: __construct

 public function __construct($fragment = null)
 {
     if ($fragment) {
         $this->setContent($fragment);
     }
     parent::__construct();
 }
開發者ID:jareddreyer,項目名稱:catalogue,代碼行數:7,代碼來源:HTMLValue.php

示例5: __construct

 public function __construct($width, $height, $url)
 {
     $this->width = $width;
     $this->height = $height;
     $this->server_url = $url;
     parent::__construct();
 }
開發者ID:helpfulrobot,項目名稱:groupdocs-groupdocs-java-document-viewer,代碼行數:7,代碼來源:Result.php

示例6: __construct

 /**
  * Creates a new restful service.
  * @param string $base Base URL of the web service eg: api.example.com
  * @param int $expiry Set the cache expiry interva. Defaults to 1 hour (3600 seconds)
  */
 public function __construct($base, $expiry = 3600)
 {
     $this->baseURL = $base;
     $this->cache_expire = $expiry;
     parent::__construct();
     $this->proxy = $this->config()->default_proxy;
 }
開發者ID:congaaids,項目名稱:silverstripe-framework,代碼行數:12,代碼來源:RestfulService.php

示例7: __construct

 /**
  * @param string $content
  */
 public function __construct($content = null)
 {
     $this->document = new DOMDocument('1.0', 'UTF-8');
     $this->document->scrictErrorChecking = false;
     $this->setContent($content);
     parent::__construct();
 }
開發者ID:SustainableCoastlines,項目名稱:loveyourwater,代碼行數:10,代碼來源:HTMLValue.php

示例8:

 /**
  * Creates a new restful service.
  * @param string $base Base URL of the web service eg: api.example.com 
  * @param int $expiry Set the cache expiry interva. Defaults to 1 hour (3600 seconds)
  */
 function __construct($base, $expiry = 3600)
 {
     $this->baseURL = $base;
     $this->cache_expire = $expiry;
     $this->proxy = self::$default_proxy;
     parent::__construct();
 }
開發者ID:NARKOZ,項目名稱:silverstripe-doc-restructuring,代碼行數:12,代碼來源:RestfulService.php

示例9: array

 /**
  * Construct a new DataObject.
  *
  * @param array|null $record This will be null for a new database record.  Alternatively, you can pass an array of
  * field values.  Normally this contructor is only used by the internal systems that get objects from the database.
  * @param boolean $isSingleton This this to true if this is a singleton() object, a stub for calling methods.  Singletons
  * don't have their defaults set.
  */
 function __construct($record = null, $isSingleton = false)
 {
     // Set the fields data.
     if (!$record) {
         $record = array("ID" => 0);
     }
     if (!is_array($record)) {
         if (is_object($record)) {
             $passed = "an object of type '{$record->class}'";
         } else {
             $passed = "The value '{$record}'";
         }
         user_error("DataObject::__construct passed {$passed}.  It's supposed to be passed an array,\n\t\t\t\ttaken straight from the database.  Perhaps you should use DataObject::get_one instead?", E_USER_WARNING);
         $record = null;
     }
     $this->record = $this->original = $record;
     // Keep track of the modification date of all the data sourced to make this page
     // From this we create a Last-Modified HTTP header
     if (isset($record['LastEdited'])) {
         HTTP::register_modification_date($record['LastEdited']);
     }
     parent::__construct();
     // Must be called after parent constructor
     if (!$isSingleton && (!isset($this->record['ID']) || !$this->record['ID'])) {
         $this->populateDefaults();
     }
     // prevent populateDefaults() and setField() from marking overwritten defaults as changed
     $this->changed = array();
 }
開發者ID:ramziammar,項目名稱:websites,代碼行數:37,代碼來源:DataObject.php

示例10: __construct

 public function __construct($name, $dataSource)
 {
     $this->name = $name;
     $this->realisedName = $name;
     $this->dataSource = $dataSource;
     parent::__construct();
 }
開發者ID:nyeholt,項目名稱:silverstripe-denormalised-content,代碼行數:7,代碼來源:FlatLayer.php

示例11: __construct

 public function __construct($width, $height, $guid)
 {
     $this->width = $width;
     $this->height = $height;
     $this->guid = $guid;
     parent::__construct();
 }
開發者ID:helpfulrobot,項目名稱:groupdocs-groupdocs-assembly,代碼行數:7,代碼來源:Result.php

示例12: __construct

 /**
  * Constructor
  * 
  * @deprecated 3.1 Use DataList to aggregate data
  * 
  * @param string $type The DataObject type we are building an aggregate for
  * @param string $filter (optional) An SQL filter to apply to the selected rows before calculating the aggregate
  */
 public function __construct($type, $filter = '')
 {
     Deprecation::notice('3.1', 'Call aggregate methods on a DataList directly instead. In templates' . ' an example of the new syntax is &lt% cached List(Member).max(LastEdited) %&gt instead' . ' (check partial-caching.md documentation for more details.)');
     $this->type = $type;
     $this->filter = $filter;
     parent::__construct();
 }
開發者ID:jakedaleweb,項目名稱:AtomCodeChallenge,代碼行數:15,代碼來源:Aggregate.php

示例13:

 /**
  * Creates a new restful service.
  * @param string $base Base URL of the web service eg: api.example.com 
  * @param int $expiry Set the cache expiry interva. Defaults to 1 hour (3600 seconds)
  * @param int $timeout (Defaults to 5 s)
  */
 function __construct($base, $expiry = 3600, $timeout = 5)
 {
     $this->baseURL = $base;
     $this->cache_expire = $expiry;
     $this->timeoutRequest = $timeout;
     $this->proxy = self::$default_proxy;
     parent::__construct();
 }
開發者ID:comperio,項目名稱:silverstripe-framework,代碼行數:14,代碼來源:RestfulService.php

示例14:

 /**
  * Construct a DataDifferencer to show the changes between $fromRecord and $toRecord.
  * If $fromRecord is null, this will represent a "creation".
  * 
  * @param DataObject (Optional)
  * @param DataObject 
  */
 function __construct($fromRecord, DataObject $toRecord)
 {
     if (!$toRecord) {
         user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING);
     }
     $this->fromRecord = $fromRecord;
     $this->toRecord = $toRecord;
     parent::__construct();
 }
開發者ID:prostart,項目名稱:cobblestonepath,代碼行數:16,代碼來源:DataDifferencer.php

示例15: __construct

 public function __construct()
 {
     $this->brokenOnConstruct = false;
     // Check necessary to avoid class conflicts before manifest is rebuilt
     if (class_exists('NullHTTPRequest')) {
         $this->request = new NullHTTPRequest();
     }
     parent::__construct();
 }
開發者ID:hamishcampbell,項目名稱:silverstripe-sapphire,代碼行數:9,代碼來源:RequestHandler.php


注:本文中的ViewableData::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。