/** * 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(); } }
/** * 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); } }
/** * Constructor. * @param TStyle style to copy from */ public function __construct($style = null) { parent::__construct(); if ($style !== null) { $this->copyFrom($style); } }
/** * Constructor. * @param IUserManager user manager */ public function __construct(IUserManager $manager) { parent::__construct(); $this->_state = array(); $this->_manager = $manager; $this->setName($manager->getGuestName()); }
/** * 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. * 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); }
/** * 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. * @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; } }
/** * 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(); }
public function __sleep() { $exprops = array(); $cn = __CLASS__; if (!$this->_parameterNames or !$this->_parameterNames->getCount()) { $exprops[] = "{$cn}_parameterNames"; } if (!$this->_parameterValues or !$this->_parameterValues->getCount()) { $exprops[] = "{$cn}_parameterValues"; } return array_diff(parent::__sleep(), $exprops); }
/** * 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); }
/** * Magic method for writing properties. * This method is overriden to provide write access to the foreign objects via * the key names declared in the RELATIONS array. * @param string property name * @param mixed property value. * @since 3.1.2 */ public function __set($name, $value) { if ($this->hasRecordRelation($name) && !$this->canSetProperty($name)) { $this->{$name} = $value; } else { parent::__set($name, $value); } }
/** * Returns the module object that contains the component or the page containing the component. * This method is overriden by TPage. * @return TModule the module object that contains the component or the page containing the component. */ public function getModule() { if ($this->root instanceof TPage) { return $this->root->getModule(); } else { return $this->root; } }
/** * Constructor, initialize the options list. */ public function __construct() { parent::__construct(); $this->_options = Prado::createComponent('System.Collections.TMap'); }
public function __sleep() { $exprops = array(); $cn = 'TResultProperty'; if ($this->_nullValue === null) { $exprops[] = "{$cn}_nullValue"; } if ($this->_propertyName === null) { $exprops[] = "{$cn}_propertyNama"; } if ($this->_columnName === null) { $exprops[] = "{$cn}_columnName"; } if ($this->_columnIndex == -1) { $exprops[] = "{$cn}_columnIndex"; } if ($this->_nestedResultMapName === null) { $exprops[] = "{$cn}_nestedResultMapName"; } if ($this->_nestedResultMap === null) { $exprops[] = "{$cn}_nestedResultMap"; } if ($this->_valueType === null) { $exprops[] = "{$cn}_valueType"; } if ($this->_typeHandler === null) { $exprops[] = "{$cn}_typeHandler"; } if ($this->_isLazyLoad === false) { $exprops[] = "{$cn}_isLazyLoad"; } if ($this->_select === null) { $exprops[] = "{$cn}_select"; } return array_diff(parent::__sleep(), $exprops); }
public function __sleep() { $exprops = array(); $cn = 'TParameterProperty'; if ($this->_typeHandler === null) { $exprops[] = "{$cn}_typeHandler"; } if ($this->_type === null) { $exprops[] = "{$cn}_type"; } if ($this->_column === null) { $exprops[] = "{$cn}_column"; } if ($this->_dbType === null) { $exprops[] = "{$cn}_dbType"; } if ($this->_property === null) { $exprops[] = "{$cn}_property"; } if ($this->_nullValue === null) { $exprops[] = "{$cn}_nullValue"; } return array_diff(parent::__sleep(), $exprops); }
/** * @param TDbCommandBuilder database specific database command builder. */ public function __construct($builder) { parent::__construct(); $this->_builder = $builder; }
public function __sleep() { $exprops = array(); $cn = __CLASS__; if (!count($this->_tree)) { $exprops[] = "{$cn}_tree"; } if (!count($this->_entries)) { $exprops[] = "{$cn}_entries"; } if (!count($this->_list)) { $exprops[] = "{$cn}_list"; } return array_diff(parent::__sleep(), $exprops); }
/** * Constructor. * @param string the DB expression */ public function __construct($expression) { parent::__construct(); $this->expression = $expression; }
/** * 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(); }
/** * 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(); }
/** * Close the connection when serializing. */ public function __sleep() { // $this->close(); - DO NOT CLOSE the current connection as serializing doesn't neccessarily mean we don't this connection anymore in the current session return array_diff(parent::__sleep(), array("TDbConnection_pdo", "TDbConnection_active")); }
/** * 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. * @param TDbConnection the connection associated with this transaction * @see TDbConnection::beginTransaction */ public function __construct(TDbConnection $connection) { parent::__construct(); $this->_connection = $connection; $this->setActive(true); }
/** * Sets the table column meta data. * @param array table column information. */ public function __construct($columnInfo) { parent::__construct(); $this->_info = $columnInfo; }
public function __sleep() { $cn = __CLASS__; $exprops = array("{$cn}_resultMap"); if (!$this->_parameterMapName) { $exprops[] = "{$cn}_parameterMapName"; } if (!$this->_parameterMap) { $exprops[] = "{$cn}_parameterMap"; } if (!$this->_parameterClassName) { $exprops[] = "{$cn}_parameterClassName"; } if (!$this->_resultMapName) { $exprops[] = "{$cn}_resultMapName"; } if (!$this->_resultMap) { $exprops[] = "{$cn}_resultMap"; } if (!$this->_resultClassName) { $exprops[] = "{$cn}_resultClassName"; } if (!$this->_cacheModelName) { $exprops[] = "{$cn}_cacheModelName"; } if (!$this->_SQL) { $exprops[] = "{$cn}_SQL"; } if (!$this->_listClass) { $exprops[] = "{$cn}_listClass"; } if (!$this->_typeHandler) { $exprops[] = "{$cn}_typeHandler"; } if (!$this->_extendStatement) { $exprops[] = "{$cn}_extendStatement"; } if (!$this->_cache) { $exprops[] = "{$cn}_cache"; } return array_diff(parent::__sleep(), $exprops); }
/** * @param TDbSchema the schema for this command builder */ public function __construct($schema) { parent::__construct(); $this->_schema = $schema; $this->_connection = $schema->getDbConnection(); }
/** * 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); }
/** * Constructor. * @param mixed sender of the event */ public function __construct($sender = null) { parent::__construct(); $this->sender = $sender; }