本文整理汇总了PHP中System::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP System::__construct方法的具体用法?PHP System::__construct怎么用?PHP System::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System
的用法示例。
在下文中一共展示了System::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Set the data from an array
*
* @param array An optional data array
*/
public function __construct($arrData = null)
{
parent::__construct();
if (is_array($arrData)) {
$this->arrData = $arrData;
}
}
示例2: __construct
/**
* @construct
*/
public function __construct()
{
parent::__construct();
$this->HostName = $this->registry->databaseHost;
$this->DB_Access = $this->registry->databaseAccess;
$this->DB_Name = $this->registry->databaseDbname;
$this->DB_User = $this->registry->databaseDbuser;
$this->DB_Pass = $this->registry->databaseDbpass;
$this->DB_Port = $this->registry->databaseDbport;
}
示例3: __construct
public function __construct()
{
parent::__construct();
// Disable debug mode
$GLOBALS['TL_CONFIG']['debugMode'] = false;
// Load required classes
\ClassLoader::addNamespace('Craffft');
\ClassLoader::addClass('Craffft\\AccountMail\\Updater', 'system/modules/accountmail/library/Craffft/AccountMail/Updater.php');
\ClassLoader::register();
// Load updater
$this->import('\\Craffft\\AccountMail\\Updater', 'Updater');
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->path_root = HTTP_ROOT;
/* Carregando Smarty */
$this->smarty = new Smarty();
$this->smarty->debugging = false;
$this->smarty->force_compile = true;
$this->smarty->caching = true;
$this->smarty->template_dir = SMARTYDIR;
$this->smarty->compile_dir = ROOT_APP . "/tmp/";
$this->smarty->config_dir = SMARTYDIR . "/configs/";
$this->smarty->cache_dir = ROOT_APP . "/tmp/cache/";
$this->smarty->assign('HTTP_ROOT', HTTP_ROOT);
$this->template = new template($this->smarty);
}
示例5: __construct
/**
* Load the relations and optionally process a result set
*
* @param \Database_Result $objResult An optional database result
*/
public function __construct(\Database_Result $objResult = null)
{
parent::__construct();
$objRelations = new \DcaExtractor(static::$strTable);
$this->arrRelations = $objRelations->getRelations();
if ($objResult !== null) {
$this->arrData = $objResult->row();
// Look for joined fields
foreach ($this->arrData as $k => $v) {
if (strpos($k, '__') !== false) {
list($key, $field) = explode('__', $k, 2);
// Create the related model
if (!isset($this->arrRelated[$key])) {
$table = $this->arrRelations[$key]['table'];
$strClass = $this->getModelClassFromTable($table);
$this->arrRelated[$key] = new $strClass();
}
$this->arrRelated[$key]->{$field} = $v;
unset($this->arrData[$k]);
}
}
}
}
示例6: __construct
/**
* Store the feed name (without file extension)
*
* @param string $strName The feed name
*/
public function __construct($strName)
{
parent::__construct();
$this->strName = $strName;
}
示例7:
function __construct($forTable = "")
{
parent::__construct();
$this->forTable = $forTable;
$this->import('Database');
}
示例8: __construct
/**
* Instantiate the object and load the mailer framework
*/
public function __construct()
{
parent::__construct();
$this->strCharset = $GLOBALS['TL_CONFIG']['characterSet'];
// Instantiate mailer
if (!is_object(self::$objMailer)) {
if (!$GLOBALS['TL_CONFIG']['useSMTP']) {
// Mail
$objTransport = \Swift_MailTransport::newInstance();
} else {
// SMTP
$objTransport = \Swift_SmtpTransport::newInstance($GLOBALS['TL_CONFIG']['smtpHost'], $GLOBALS['TL_CONFIG']['smtpPort']);
// Encryption
if ($GLOBALS['TL_CONFIG']['smtpEnc'] == 'ssl' || $GLOBALS['TL_CONFIG']['smtpEnc'] == 'tls') {
$objTransport->setEncryption($GLOBALS['TL_CONFIG']['smtpEnc']);
}
// Authentication
if ($GLOBALS['TL_CONFIG']['smtpUser'] != '') {
$objTransport->setUsername($GLOBALS['TL_CONFIG']['smtpUser'])->setPassword($GLOBALS['TL_CONFIG']['smtpPass']);
}
}
self::$objMailer = \Swift_Mailer::newInstance($objTransport);
}
// Instantiate Swift_Message
$this->objMessage = \Swift_Message::newInstance();
$this->objMessage->getHeaders()->addTextHeader('X-Mailer', 'Contao Open Source CMS');
}
示例9: __construct
public function __construct()
{
parent::__construct();
}
示例10: __construct
public function __construct($tabelas = null)
{
parent::__construct();
$this->_tabelas = $tabelas == null ? ModelTable::getListTabelas() : $tabelas;
}
示例11: __construct
public function __construct($channelId)
{
parent::__construct();
$this->channelId = $channelId;
$this->import('Database');
}
示例12: __construct
public function __construct($numberOfBytes, $formatWithPrecision = self::DEFAULT_FORMAT_PRECISION)
{
parent::__construct($numberOfBytes, new Formatter(self::scale(), $formatWithPrecision));
}
示例13: __construct
public function __construct()
{
\System::__construct();
$this->import("Database");
}
示例14: __construct
/**
* Constructor
*
* Instance of SecurityManager
* @return void
*/
public function __construct()
{
parent::__construct();
// get instance of request
$this->request = $this->objectManager->getObject('Request');
}
示例15: __construct
/**
* Constructor
*
* Instance of SecurityManager
* @return void
*/
public function __construct()
{
parent::__construct();
// xml file with filters
$this->source = $_SERVER["DOCUMENT_ROOT"] . '/' . $this->registry->securityFile;
}