本文整理汇总了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();
}
示例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();
}
示例3:
function __construct($name)
{
parent::__construct();
if (preg_match('/^(\\w+)$/i', $name, $match)) {
$this->Name = $match[1];
}
}
示例4: __construct
public function __construct($fragment = null)
{
if ($fragment) {
$this->setContent($fragment);
}
parent::__construct();
}
示例5: __construct
public function __construct($width, $height, $url)
{
$this->width = $width;
$this->height = $height;
$this->server_url = $url;
parent::__construct();
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例10: __construct
public function __construct($name, $dataSource)
{
$this->name = $name;
$this->realisedName = $name;
$this->dataSource = $dataSource;
parent::__construct();
}
示例11: __construct
public function __construct($width, $height, $guid)
{
$this->width = $width;
$this->height = $height;
$this->guid = $guid;
parent::__construct();
}
示例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 <% cached List(Member).max(LastEdited) %> instead' . ' (check partial-caching.md documentation for more details.)');
$this->type = $type;
$this->filter = $filter;
parent::__construct();
}
示例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();
}
示例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();
}
示例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();
}