本文整理汇总了PHP中Template::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Template::__construct方法的具体用法?PHP Template::__construct怎么用?PHP Template::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Template
的用法示例。
在下文中一共展示了Template::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
// Register filters
$this->filter('parseText', '$this->parseText');
$this->filter('formatFilesize', '$this->formatFilesize');
parent::__construct();
}
示例2: __construct
public function __construct($_parameters)
{
parent::__construct($_parameters);
$this->tags["content"] = $this->makePage($_parameters["page"]["project"]);
$this->tags["menu"] = $this->makeMenu($_parameters["page"]["project"]);
$this->addFile("js/detail.min.js");
}
示例3: __construct
public function __construct(stdClass $langObject)
{
parent::__construct();
$this->assign('currentTemplate', $this->tplFilename);
$this->assign('language', $langObject);
$this->initTemplate();
}
示例4: __construct
public function __construct()
{
//exit(json_encode(func_get_args()));
if (func_num_args() == 1) {
$n = func_get_arg(0);
//exit(json_encode($n));
parent::__construct($n->Key, $n->Id);
$this->setReceiptNumber($n->receiptNumber);
$this->setDate($n->date, $n->period);
$this->setTaxType($n->taxTypeID);
$this->setAmountZMK($n->amount_zmk);
$this->setAmountUSD($n->amount_usd);
$this->setAgentFees($n->agent_fees);
$this->setPeriodStart($n->periodStart, $n->period);
$this->setPeriodEnd($n->periodEnd, $n->period);
$this->setComments($n->comments);
$this->setReceipt($n->receipt);
} else {
$this->setDate(func_get_arg(0));
$this->setReceiptNumber(func_get_arg(1));
$this->setTaxType(func_get_arg(2));
$this->setAmountZMK(func_get_arg(4));
$this->setAmountUSD(func_get_arg(5));
$this->setAgentFees(func_get_arg(6));
$this->setPeriodStart(func_get_arg(7));
$this->setPeriodEnd(func_get_arg(8));
$this->setComments(func_get_arg(9));
$this->setReceipt(func_get_arg(10));
}
}
示例5: __construct
public function __construct(stdClass $langObject)
{
parent::__construct();
$this->assign('language', $langObject);
$this->mainObject = new TPL_Main($langObject);
$this->initFrame();
}
示例6: __construct
public function __construct($_parameters)
{
//["i"], [false]
parent::__construct($_parameters);
if (isset($_parameters["page"]["skip"]) && $_parameters["page"]["skip"] != true) {
$this->addModule(new Form());
$this->addModule(new Button());
$this->addModule(new Table());
$this->addModule(new Popup());
$this->modules["Form"]->addConnection("base", $this->currentConnection);
$this->modules["Table"]->addConnection("base", $this->currentConnection);
$this->modules["Table"]->modules["Form"]->addConnection("base", $this->currentConnection);
$this->data["table"] = "anagrafica";
$this->data["linkView"] = "anagrafica_v";
$this->data["formName"] = "formAna";
if ($_parameters["page"][0] == "i") {
$this->tags["content"] .= $this->drawPageInsert();
}
if ($_parameters["page"][0] == "f") {
$this->tags["content"] .= $this->drawPageFind();
}
if ($_parameters["page"][0] == "v") {
$this->tags["content"] .= $this->drawPageView();
}
}
}
示例7: __construct
/**
* Constructor
*
* @param $controller Controller
* @return TemplateCache
* @author Justin Palmer
**/
public function __construct($controller)
{
parent::__construct($controller);
$this->cache_type = Registry::get('pr-cache-template');
if ($this->isValidCacheType()) {
$this->factory();
}
}
示例8: __construct
public function __construct($n)
{
parent::__construct(isset($n->Key) ? $n->Key : $n->pepID, isset($n->Id) ? $n->Id : '');
$this->setName($n->name);
$this->setPublicOfficePosition($n->publicOfficePosition);
$this->setDateOfficeAssumed($n->dateOfficeAssumed);
$this->setDateOfficeLeft($n->dateOfficeLeft);
}
示例9: __construct
/**
* Constructor
* @param string $tplName The name of the Template file (without .xml)
*/
public function __construct($tplName)
{
parent::__construct($tplName);
// Render as XML
$this->setOutputMode(\PHPTAL::XML);
// Strip comments
$this->stripComments(false);
}
示例10: __construct
public function __construct($n)
{
parent::__construct($n->Key, $n->Id);
$this->setReferenceNumber($n->refNumber);
$this->setPaymentZMW($n->paid_received_zmw);
$this->setPaymentUSD($n->paid_received_usd);
$this->setComments($n->comments);
}
示例11: catch
/**
* Создание экземпляра класса из файла
* @param string $fileSpec полная спецификация имени файла.
*/
function __construct($fileSpec)
{
try {
$tpl = file_get_contents($fileSpec);
} catch (\Exception $e) {
echo 'Exception: ', $e->getMessage(), "\n";
}
parent::__construct($tpl);
}
示例12: __construct
public function __construct($n)
{
parent::__construct(isset($n->Key) ? $n->Key : $n->beneficialOwnerID, isset($n->Id) ? $n->Id : '');
$this->setBeneficialOwner($n->beneficialOwner);
$this->setNameOftheEntity($n->nameOftheEntity);
$this->setNationalityOftheEntity($n->nationalityOftheEntity);
$this->setInterest($n->interest);
$this->setIsListedEntity($n->isListedEntity);
$this->setStockExchange($n->stockExchange);
}
示例13: __construct
/**
* @see Template::__construct()
*/
public function __construct($languageID = 0, $templatePaths = array(), $pluginDir = '', $compileDir = '')
{
if (!$templatePaths) {
$templatePaths = WCF_DIR . 'acp/templates/';
}
if (!$compileDir) {
$compileDir = WCF_DIR . 'acp/templates/compiled/';
}
parent::__construct($languageID, $templatePaths, $pluginDir, $compileDir);
}
示例14: __construct
public function __construct($n)
{
parent::__construct(isset($n->Key) ? $n->Key : $n->detailsID, isset($n->Id) ? $n->Id : '');
$this->setProjectDescription($n->projectDescription);
$this->setProjectLocation($n->locationOfProject);
$this->setTotalBudgetOfEngagementProject($n->projectBudget);
$this->setValueOfProjectIncurred($n->valueOfProjectInYear);
$this->setCumulatedValueOfProjectIncurred($n->cummulativeValueOfProject_eoy);
$this->setTermsOfTransactionAndLegalBasis($n->terms_legalBasis);
}
示例15: __construct
/**
* Constructor
* @param string $tplName The name of the Template file (without .xml)
* @param string $title The title of the Meta Box (should be translated)
* @param array $postTypes The post types to limit the meta box to, empty array for all post types
* @param string $context The position of the meta box (default, side, advanced)
* @param string $priority The priority of the metabox (low, default, high)
*/
public function __construct($tplName, $title, $postTypes = array(), $context = 'advanced', $priority = 'default')
{
parent::__construct($tplName);
$this->postTypes = $postTypes;
$this->name = $tplName;
$this->title = $title;
$this->context = $context;
$this->priority = $priority;
add_action('add_meta_boxes', array($this, 'addMetaBoxAction'));
add_action('save_post', array($this, 'savePostAction'));
}