/**
  * Gets the containing result map ID.
  * @param TResultMap containing result map.
  */
 public function __construct($resultMap = null)
 {
     parent::__construct();
     if ($resultMap instanceof TResultMap) {
         $this->_hostResultMapID = $resultMap->getID();
     }
 }
Beispiel #2
0
 /**
  * Constructor.
  * @param TStyle style to copy from
  */
 public function __construct($style = null)
 {
     parent::__construct();
     if ($style !== null) {
         $this->copyFrom($style);
     }
 }
Beispiel #3
0
 /**
  * Constructor.
  * @param IUserManager user manager
  */
 public function __construct(IUserManager $manager)
 {
     parent::__construct();
     $this->_state = array();
     $this->_manager = $manager;
     $this->setName($manager->getGuestName());
 }
Beispiel #4
0
 /**
  * Constructor.
  * Initializes the queue with an array or an iterable object.
  * @param array|Iterator the intial data. Default is null, meaning no initialization.
  * @throws TInvalidDataTypeException If data is not null and neither an array nor an iterator.
  */
 public function __construct($data = null)
 {
     parent::__construct();
     if ($data !== null) {
         $this->copyFrom($data);
     }
 }
Beispiel #5
0
 /**
  * Constructor.
  * Initializes the list with an array or an iterable object.
  * @param array|Iterator the initial data. Default is null, meaning no initialization.
  * @param boolean whether the list is read-only
  * @throws TInvalidDataTypeException If data is not null and neither an array nor an iterator.
  */
 public function __construct($data = null, $readOnly = false)
 {
     parent::__construct();
     if ($data !== null) {
         $this->copyFrom($data);
     }
     $this->setReadOnly($readOnly);
 }
Beispiel #6
0
 /**
  * Constructor.
  * @param string text of the item
  * @param string value of the item
  * @param boolean whether the item is enabled
  * @param boolean whether the item is selected
  */
 public function __construct($text = '', $value = '', $enabled = true, $selected = false)
 {
     parent::__construct();
     $this->setText($text);
     $this->setValue($value);
     $this->setEnabled($enabled);
     $this->setSelected($selected);
 }
 /**
  * Constructor.
  * A join tree is built up based on the declared relationships between active record classes.
  * @param CActiveRecord the model that initiates the active finding process
  * @param mixed the relation names to be actively looked for
  * @param CDbCriteria the criteria associated with the named scopes (since version 1.0.5)
  */
 public function __construct($model, $with, $criteria = null)
 {
     parent::__construct();
     $this->_criteria = $criteria;
     $this->_builder = $model->getCommandBuilder();
     $this->_joinTree = new TJoinElement($this, $model);
     $this->buildJoinTree($this->_joinTree, $with);
 }
 /**
  * Sets the database table meta data information.
  * @param array table column information.
  */
 public function __construct($tableInfo = array(), $primary = array(), $foreign = array())
 {
     parent::__construct();
     $this->_info = $tableInfo;
     $this->_primaryKeys = $primary;
     $this->_foreignKeys = $foreign;
     $this->_columns = new TMap();
 }
 /**
  * Constructor, create a new SqlMap manager.
  * @param TDbConnection database connection
  * @param string configuration file.
  */
 public function __construct($connection = null)
 {
     parent::__construct();
     $this->_connection = $connection;
     $this->_mappedStatements = new TMap();
     $this->_resultMaps = new TMap();
     $this->_parameterMaps = new TMap();
     $this->_cacheModels = new TMap();
 }
Beispiel #10
0
 /**
  * Constructor.
  * @param TDbConnection database connection.
  */
 public function __construct($conn)
 {
     parent::__construct();
     $conn->setActive(true);
     $this->_connection = $conn;
     foreach ($conn->schemaCachingExclude as $name) {
         $this->_cacheExclude[$name] = true;
     }
 }
Beispiel #11
0
 /**
  * Creates a new criteria with given condition;
  * @param string sql string after the WHERE stanza
  * @param mixed named or indexed parameters, accepts as multiple arguments.
  */
 public function __construct($condition = null, $parameters = array())
 {
     parent::__construct();
     if (!is_array($parameters) && func_num_args() > 1) {
         $parameters = array_slice(func_get_args(), 1);
     }
     $this->_parameters = new TAttributeCollection();
     $this->_parameters->setCaseSensitive(true);
     $this->_parameters->copyFrom((array) $parameters);
     $this->_ordersBy = new TAttributeCollection();
     $this->_ordersBy->setCaseSensitive(true);
     $this->setCondition($condition);
 }
Beispiel #12
0
 /**
  * Constructor.
  * Note, the DB connection is not established when this connection
  * instance is created. Set {@link setActive active} property to true
  * to establish the connection.
  * @param string The Data Source Name, or DSN, contains the information required to connect to the database.
  * @param string The user name for the DSN string.
  * @param string The password for the DSN string.
  * @see http://www.php.net/manual/en/function.PDO-construct.php
  */
 public function __construct($dsn = '', $username = '', $password = '')
 {
     parent::__construct();
     $this->connectionString = $dsn;
     $this->username = $username;
     $this->password = $password;
 }
Beispiel #13
0
 /**
  * Constructor.
  * @param string the DB expression
  */
 public function __construct($expression)
 {
     parent::__construct();
     $this->expression = $expression;
 }
 /**
  * Creates a new mapped statement.
  * @param TSqlMapper an sqlmap.
  * @param TSqlMapStatement An SQL statement.
  */
 public function __construct(TSqlMapManager $sqlMap, TSqlMapStatement $statement)
 {
     parent::__construct();
     $this->_manager = $sqlMap;
     $this->_statement = $statement;
     $this->_command = new TPreparedCommand();
     $this->initialGroupByResults();
 }
 /**
  * Constructor.
  */
 function __construct()
 {
     $this->setRoot($this);
     parent::__construct();
 }
Beispiel #16
0
 /**
  * Initialize the columns collection.
  */
 public function __construct()
 {
     parent::__construct();
     $this->_columns = new TMap();
 }
Beispiel #17
0
 /**
  * Constructor.
  * @param mixed sender of the event
  */
 public function __construct($sender = null)
 {
     parent::__construct();
     $this->sender = $sender;
 }
 /**
  * Constructor, initialize the options list.
  */
 public function __construct()
 {
     parent::__construct();
     $this->_options = Prado::createComponent('System.Collections.TMap');
 }
 /**
  * @param TDbConnection database connection.
  * @param TDbTableInfo table information.
  */
 public function __construct($connection = null, $tableInfo = null)
 {
     parent::__construct();
     $this->setDbConnection($connection);
     $this->setTableInfo($tableInfo);
 }
 /**
  * Constructor. Attach a base active control to an active control instance.
  * @param TControl active control
  */
 public function __construct($control)
 {
     parent::__construct();
     $this->_control = $control;
     $this->_options = new TMap();
 }
 /**
  * Sets the table column meta data.
  * @param array table column information.
  */
 public function __construct($columnInfo)
 {
     parent::__construct();
     $this->_info = $columnInfo;
 }
Beispiel #22
0
 /**
  * Constructor.
  * @param TDbCommand the command generating the query result
  */
 public function __construct(TDbCommand $command)
 {
     parent::__construct();
     $this->_statement = $command->getPdoStatement();
     $this->_statement->setFetchMode(PDO::FETCH_ASSOC);
 }
Beispiel #23
0
 /**
  * Constructor.
  * @param TDbConnection the database connection
  * @param string the SQL statement to be executed
  */
 public function __construct(TDbConnection $connection, $text)
 {
     parent::__construct();
     $this->_connection = $connection;
     $this->setText($text);
 }
Beispiel #24
0
 /**
  * Constructor.
  * Initializes the body collection.
  */
 function __construct()
 {
     $this->bodies = new TBodyCollection($this);
     parent::__construct();
 }
 /**
  * @param TDbCommandBuilder database specific database command builder.
  */
 public function __construct($builder)
 {
     parent::__construct();
     $this->_builder = $builder;
 }
 /**
  * Constructor.
  * @param TDbConnection the connection associated with this transaction
  * @see TDbConnection::beginTransaction
  */
 public function __construct(TDbConnection $connection)
 {
     parent::__construct();
     $this->_connection = $connection;
     $this->setActive(true);
 }
 /**
  * @param TDbSchema the schema for this command builder
  */
 public function __construct($schema)
 {
     parent::__construct();
     $this->_schema = $schema;
     $this->_connection = $schema->getDbConnection();
 }
Beispiel #28
0
 /**
  * @param TDbConnection database connection.
  */
 public function __construct($conn)
 {
     parent::__construct();
     $this->_connection = $conn;
 }
Beispiel #29
0
 /**
  * Constructor.
  * @param TUrlManager the URL manager instance
  */
 public function __construct(TUrlManager $manager)
 {
     parent::__construct();
     $this->_manager = $manager;
     $this->_parameters = new TAttributeCollection();
     $this->_parameters->setCaseSensitive(true);
 }
Beispiel #30
0
 /**
  * Constructor.
  * Sets application base path and initializes the application singleton.
  * Application base path refers to the root directory storing application
  * data and code not directly accessible by Web users.
  * By default, the base path is assumed to be the <b>protected</b>
  * directory under the directory containing the current running script.
  * @param string application base path or configuration file path.
  *        If the parameter is a file, it is assumed to be the application
  *        configuration file, and the directory containing the file is treated
  *        as the application base path.
  *        If it is a directory, it is assumed to be the application base path,
  *        and within that directory, a file named <b>application.xml</b>
  *        will be looked for. If found, the file is considered as the application
  *        configuration file.
  * @param boolean whether to cache application configuration. Defaults to true.
  * @param string The type of configuration te app should have. Defaults to {@link CONFIG_TYPE_XML}.
  * @throws TConfigurationException if configuration file cannot be read or the runtime path is invalid.
  */
 public function __construct($basePath = 'protected', $cacheConfig = true, $configType = self::CONFIG_TYPE_XML)
 {
     // register application as a singleton
     Prado::setApplication($this);
     $this->setConfigurationType($configType);
     $this->resolvePaths($basePath);
     if ($cacheConfig) {
         $this->_cacheFile = $this->_runtimePath . DIRECTORY_SEPARATOR . self::CONFIGCACHE_FILE;
     }
     // generates unique ID by hashing the runtime path
     $this->_uniqueID = md5($this->_runtimePath);
     $this->_parameters = new TMap();
     $this->_parametersfinal = new TMap();
     $this->_services = array($this->getPageServiceID() => array('TPageService', array(), null));
     Prado::setPathOfAlias('Application', $this->_basePath);
     parent::__construct();
 }