本文整理汇总了PHP中Document::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Document::__construct方法的具体用法?PHP Document::__construct怎么用?PHP Document::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Document
的用法示例。
在下文中一共展示了Document::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name = null)
{
parent::__construct();
if ($name) {
$this->setName($name);
}
}
示例2: run
public function run()
{
parent::__construct();
// set title
$this->__Layout->__Head()->setTitle('Demo Web');
// add view port
$this->__Layout->__Head()->add_MetaTag('name', 'viewport', 'width=device-width, initial-scale=1, user-scalable=no');
$this->__Layout->__Head()->add_MetaTag('name', 'googlebot', 'noodp');
$this->__Layout->__Head()->add_MetaTag('name', 'msnbot', 'noodp');
$this->__Layout->__Head()->add_MetaTag('name', 'slurp', 'noodp');
$this->__Layout->__Head()->add_MetaTag('name', 'keywords', 'Template Engine, Beispiel, Sample');
$this->__Layout->__Head()->add_MetaTag('name', 'description', 'Das ist eine Beispiel-Seite des Template-Systems');
$this->__Layout->__Head()->add_MetaTag('name', 'author', 'Gino Dola');
$this->__Layout->__Head()->add_MetaTag('name', 'copyright', 'opta data marktforschung & marketing GmbH');
$this->__Layout->__Head()->add_MetaTag('name', 'language', 'de');
$this->__Layout->__Head()->add_MetaTag('name', 'revisit-after', '7 days');
$this->__Layout->__Head()->add_MetaTag('name', 'robots', 'index,follow,noodp');
// add javascript to library
$this->__Layout->__Head()->add_Library_JavaScript('/jquery-current.min.js');
$this->__Layout->__Head()->add_Library_JavaScript('/functions.js');
// add javascript to library
$this->__Layout->__Head()->add_Library_Stylesheet('/reset.css');
$this->__Layout->__Head()->add_Library_Stylesheet('/style.css');
// add stylesheets
$args = array('media' => 'all');
$this->__Layout->__Head()->add_Stylesheet('http://fonts.googleapis.com/css?family=Roboto:400,400italic,500italic,500,300,300italic,100,700', $args);
$args = array('media' => 'all and (orientation: landscape)');
$this->__Layout->__Head()->add_Stylesheet('/grid.css', $args);
$this->__Layout->__Head()->add_Stylesheet('/desktop.css', $args);
$args = array('media' => 'all and (orientation: portrait)');
$this->__Layout->__Head()->add_Stylesheet('/mobile.css', $args);
// end function
}
示例3: __construct
public function __construct($name = null)
{
parent::__construct();
$this->load->model('teamRepository', '_team');
if ($name) {
$this->setName($name);
}
}
示例4: __construct
/**
* Class constructor
*
* @param array $options Associative array of options
*
* @since 11.1
*/
public function __construct($options = array())
{
parent::__construct($options);
// Set mime type
$this->_mime = 'text/html';
// Set document type
$this->_type = 'raw';
}
示例5: run
public function run()
{
parent::__construct();
/*** SELECT ***/
$output = 'Database Result:<br /><br /><pre>' . print_r($res, true) . '</pre>';
$this->replace('result', $output);
// end function
}
示例6: __construct
/**
* Construct conifguration.
* @param Store $store Optional store to load/save data from/to.
*/
public function __construct(Store $store = null)
{
parent::__construct();
if (isset($store)) {
$this->store = $store;
$this->reload();
}
}
示例7: __construct
/**
* Constructs an empty graph
*
* @param array $name - optional, initial name for graph
* @param array $options - optional, initial options for graph
* @since 1.2
* @return Graph
*/
public function __construct($name = null, array $options = array())
{
// prevent backwards compatibility break where the first parameter is the $options array
if (!is_array($name) && $name != null) {
$this->set('_key', $name);
}
// pass the $options to the parent constructor to do the actual work
parent::__construct($options);
}
示例8: execute
public function execute(HTTP_Request $request, HTTP_Response $response)
{
parent::__construct();
$this->req = $request;
$this->res = $response;
$this->json['data'] = 'Action executed...';
$this->shutdown();
// end function
}
示例9: __construct
/**
* Construct state.
* @param Store $store Store to load/save data from/to.
* @throws AccessException If state could not be read.
*/
public function __construct(Store $store)
{
parent::__construct();
$this->store = $store;
try {
$this->store->open(true);
$this->data = $this->store->read();
} catch (AccessException $e) {
throw new AccessException(tr('Could not open session: %1', $e->getMessage()), null, $e);
}
}
示例10: __construct
/**
* Construct state.
*
* @param Store $store
* Store to load/save data from/to.
* @param bool $mutable
* Whether state is mutable (true) or read-only (false).
* @throws AccessException If state could not be read.
*/
public function __construct(Store $store, $mutable = true)
{
parent::__construct();
$this->store = $store;
try {
$this->store->open($mutable);
$this->data = $this->store->read();
} catch (AccessException $e) {
throw new AccessException('Could not read state: ' . $e->getMessage(), null, $e);
}
}
示例11: __construct
public function __construct()
{
parent::__construct();
/*
$player = array(
'ref' => new Player()
'position' => DH, P, C, 1B, 2B, etc…
'order' => 1-9+
);
*/
}
示例12: __construct
public function __construct()
{
parent::__construct();
}
示例13: __construct
/**
* Create an XML document object.
*
* @param RESTClient $client A REST client object.
* @param string $uri A document URI.
*/
public function __construct($client, $uri = null)
{
parent::__construct($client, $uri);
$this->dom = new \DOMDocument();
$this->contentType = 'application/xml';
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->playerType = 'GameBatter';
}
示例15: __construct
public function __construct()
{
parent::__construct();
$this->load->model('GameRepository', '_game');
}