示例#1
0
文件: FeedItem.php 项目: rburch/core
 /**
  * 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
0
 /**
  * @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
0
 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
0
 public function __construct()
 {
     parent::__construct();
     // Disable debug mode
     $GLOBALS['TL_CONFIG']['debugMode'] = false;
     // Load required classes
     \ClassLoader::addNamespace('Photoalbums2');
     \ClassLoader::addClass('Photoalbums2\\Updater', 'system/modules/photoalbums2/classes/Updater.php');
     \ClassLoader::register();
     // Load updater
     $this->import('\\Photoalbums2\\Updater', 'Updater');
 }
 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);
 }
示例#6
0
文件: Model.php 项目: rikaix/core
 /**
  * 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]);
             }
         }
     }
 }
示例#7
0
文件: Feed.php 项目: rburch/core
 /**
  * Store the feed name (without file extension)
  * 
  * @param string $strName The feed name
  */
 public function __construct($strName)
 {
     parent::__construct();
     $this->strName = $strName;
 }
示例#8
0
文件: TagList.php 项目: AgentCT/tags
 function __construct($forTable = "")
 {
     parent::__construct();
     $this->forTable = $forTable;
     $this->import('Database');
 }
示例#9
0
文件: Email.php 项目: rikaix/core
 /**
  * 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');
 }
示例#10
0
 public function __construct()
 {
     parent::__construct();
 }
示例#11
0
 public function __construct($tabelas = null)
 {
     parent::__construct();
     $this->_tabelas = $tabelas == null ? ModelTable::getListTabelas() : $tabelas;
 }
 public function __construct($channelId)
 {
     parent::__construct();
     $this->channelId = $channelId;
     $this->import('Database');
 }
示例#13
0
 public function __construct($numberOfBytes, $formatWithPrecision = self::DEFAULT_FORMAT_PRECISION)
 {
     parent::__construct($numberOfBytes, new Formatter(self::scale(), $formatWithPrecision));
 }
示例#14
0
 public function __construct()
 {
     \System::__construct();
     $this->import("Database");
 }
示例#15
0
 /**
  * Constructor
  *
  * Instance of SecurityManager
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // get instance of request
     $this->request = $this->objectManager->getObject('Request');
 }
示例#16
0
 /**
  * Constructor
  *
  * Instance of SecurityManager
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // xml file with filters
     $this->source = $_SERVER["DOCUMENT_ROOT"] . '/' . $this->registry->securityFile;
 }
示例#17
0
文件: User.php 项目: rikaix/core
 /**
  * Import the database object
  */
 protected function __construct()
 {
     parent::__construct();
     $this->import('Database');
 }
示例#18
0
 /**
  * Store the database result and table name
  * 
  * @param \Database\Result $objResult The database result object
  * @param string           $strTable  The table name
  */
 public function __construct(\Database\Result $objResult, $strTable)
 {
     parent::__construct();
     $this->objResult = $objResult;
     $this->strTable = $strTable;
 }
示例#19
0
文件: User.php 项目: Auwibana/babesk
 public function __construct($name, $display_name, $path)
 {
     parent::__construct($name, $display_name, $path);
 }
示例#20
0
 /**
  * Construct the class
  */
 public function __construct()
 {
     parent::__construct();
     $this->import('Database');
 }