diff --git a/CHANGELOG b/CHANGELOG index 7f30d39f4..8d883361f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -46,6 +46,7 @@ Version 1.1.15 under development - Enh #3014: Allow changing the database used by ActiveRecord in beforeCount() like it is possible in beforeFind() already (cebe) - Enh #3023: Added support for formatting DateTime instances to CFormatter (cebe, nitso) - Enh #3048: CApcCache is now compatible with APCu (iobotis, samdark) +- Enh #3115: Updated phpdoc for better code completion in modern IDEs (samdark) - Chg #2653: Upgraded Markdown Extra Lib to version 1.3 (SleepWalker) - Chg #3137: Upgraded HTMLPurifier to 4.6.0 (samdark) - New #2955: Added official support for MariaDB (cebe, DaSourcerer) diff --git a/framework/db/CDbCommand.php b/framework/db/CDbCommand.php index c196f7248..3e5fccf09 100644 --- a/framework/db/CDbCommand.php +++ b/framework/db/CDbCommand.php @@ -122,7 +122,7 @@ class CDbCommand extends CComponent /** * Set the default fetch mode for this statement * @param mixed $mode fetch mode - * @return CDbCommand + * @return static * @see http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php * @since 1.1.7 */ @@ -138,7 +138,7 @@ class CDbCommand extends CComponent * This method is mainly used when a command object is being reused * multiple times for building different queries. * Calling this method will clean up all internal states of the command object. - * @return CDbCommand this command instance + * @return static this command instance * @since 1.1.6 */ public function reset() @@ -165,7 +165,7 @@ class CDbCommand extends CComponent * Specifies the SQL statement to be executed. * Any previous execution will be terminated or cancel. * @param string $value the SQL statement to be executed - * @return CDbCommand this command instance + * @return static this command instance */ public function setText($value) { @@ -239,7 +239,7 @@ class CDbCommand extends CComponent * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value. * @param integer $length length of the data type * @param mixed $driverOptions the driver-specific options (this is available since version 1.1.6) - * @return CDbCommand the current command being executed + * @return static the current command being executed * @see http://www.php.net/manual/en/function.PDOStatement-bindParam.php */ public function bindParam($name, &$value, $dataType=null, $length=null, $driverOptions=null) @@ -265,7 +265,7 @@ class CDbCommand extends CComponent * placeholders, this will be the 1-indexed position of the parameter. * @param mixed $value The value to bind to the parameter * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value. - * @return CDbCommand the current command being executed + * @return static the current command being executed * @see http://www.php.net/manual/en/function.PDOStatement-bindValue.php */ public function bindValue($name, $value, $dataType=null) @@ -286,7 +286,7 @@ class CDbCommand extends CComponent * @param array $values the values to be bound. This must be given in terms of an associative * array with array keys being the parameter names, and array values the corresponding parameter values. * For example, array(':name'=>'John', ':age'=>25). - * @return CDbCommand the current command being executed + * @return static the current command being executed * @since 1.1.5 */ public function bindValues($values) @@ -598,7 +598,7 @@ class CDbCommand extends CComponent * (which means the column contains a DB expression). * @param string $option additional option that should be appended to the 'SELECT' keyword. For example, * in MySQL, the option 'SQL_CALC_FOUND_ROWS' can be used. This parameter is supported since version 1.1.8. - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function select($columns='*', $option='') @@ -690,7 +690,7 @@ class CDbCommand extends CComponent * Table names can contain schema prefixes (e.g. 'public.tbl_user') and/or table aliases (e.g. 'tbl_user u'). * The method will automatically quote the table names unless it contains some parenthesis * (which means the table is given as a sub-query or DB expression). - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function from($tables) @@ -772,7 +772,7 @@ class CDbCommand extends CComponent * * @param mixed $conditions the conditions that should be put in the WHERE part. * @param array $params the parameters (name=>value) to be bound to the query - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function where($conditions, $params=array()) @@ -793,7 +793,7 @@ class CDbCommand extends CComponent * * @param mixed $conditions the conditions that should be appended to the WHERE part. * @param array $params the parameters (name=>value) to be bound to the query. - * @return CDbCommand the command object itself. + * @return static the command object itself. * @since 1.1.13 */ public function andWhere($conditions,$params=array()) @@ -817,7 +817,7 @@ class CDbCommand extends CComponent * * @param mixed $conditions the conditions that should be appended to the WHERE part. * @param array $params the parameters (name=>value) to be bound to the query. - * @return CDbCommand the command object itself. + * @return static the command object itself. * @since 1.1.13 */ public function orWhere($conditions,$params=array()) @@ -964,7 +964,7 @@ class CDbCommand extends CComponent * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. array('id', 'name')). * The method will automatically quote the column names unless a column contains some parenthesis * (which means the column contains a DB expression). - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function group($columns) @@ -1013,7 +1013,7 @@ class CDbCommand extends CComponent * @param mixed $conditions the conditions to be put after HAVING. * Please refer to {@link where} on how to specify conditions. * @param array $params the parameters (name=>value) to be bound to the query - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function having($conditions, $params=array()) @@ -1058,7 +1058,7 @@ class CDbCommand extends CComponent * $criteria->order('(1)'); * * - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function order($columns) @@ -1111,7 +1111,7 @@ class CDbCommand extends CComponent * Sets the LIMIT part of the query. * @param integer $limit the limit * @param integer $offset the offset - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function limit($limit, $offset=null) @@ -1146,7 +1146,7 @@ class CDbCommand extends CComponent /** * Sets the OFFSET part of the query. * @param integer $offset the offset - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function offset($offset) @@ -1179,7 +1179,7 @@ class CDbCommand extends CComponent /** * Appends a SQL statement using UNION operator. * @param string $sql the SQL statement to be appended using UNION - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ public function union($sql) @@ -1554,7 +1554,7 @@ class CDbCommand extends CComponent * @param mixed $conditions the join condition that should appear in the ON part. * Please refer to {@link where} on how to specify conditions. * @param array $params the parameters (name=>value) to be bound to the query - * @return CDbCommand the command object itself + * @return static the command object itself * @since 1.1.6 */ private function joinInternal($type, $table, $conditions='', $params=array()) diff --git a/framework/db/CDbConnection.php b/framework/db/CDbConnection.php index 7e450aca4..14ebfe8aa 100644 --- a/framework/db/CDbConnection.php +++ b/framework/db/CDbConnection.php @@ -347,7 +347,7 @@ class CDbConnection extends CApplicationComponent * the query results into cache. * @param integer $queryCount number of SQL queries that need to be cached after calling this method. Defaults to 1, * meaning that the next SQL query will be cached. - * @return CDbConnection the connection instance itself. + * @return static the connection instance itself. * @since 1.1.7 */ public function cache($duration, $dependency=null, $queryCount=1) diff --git a/framework/db/ar/CActiveRecord.php b/framework/db/ar/CActiveRecord.php index 87a27ca20..92367ae8a 100644 --- a/framework/db/ar/CActiveRecord.php +++ b/framework/db/ar/CActiveRecord.php @@ -105,7 +105,7 @@ abstract class CActiveRecord extends CModel * the query results into cache. * @param integer $queryCount number of SQL queries that need to be cached after calling this method. Defaults to 1, * meaning that the next SQL query will be cached. - * @return CActiveRecord the active record instance itself. + * @return static the active record instance itself. * @since 1.1.7 */ public function cache($duration, $dependency=null, $queryCount=1) @@ -357,7 +357,7 @@ abstract class CActiveRecord extends CModel * Resets all scopes and criterias applied. * * @param boolean $resetDefault including default scope. This parameter available since 1.1.12 - * @return CActiveRecord + * @return static the AR instance itself * @since 1.1.2 */ public function resetScope($resetDefault=true) @@ -384,7 +384,7 @@ abstract class CActiveRecord extends CModel * * * @param string $className active record class name. - * @return CActiveRecord active record model instance. + * @return static active record model instance. */ public static function model($className=__CLASS__) { @@ -1450,7 +1450,7 @@ abstract class CActiveRecord extends CModel * @param array $params parameters to be bound to an SQL statement. * This is only used when the first parameter is a string (query condition). * In other cases, please use {@link CDbCriteria::params} to set parameters. - * @return CActiveRecord the record found. Null if no record is found. + * @return static the record found. Null if no record is found. */ public function find($condition='',$params=array()) { @@ -1464,7 +1464,7 @@ abstract class CActiveRecord extends CModel * See {@link find()} for detailed explanation about $condition and $params. * @param mixed $condition query condition or criteria. * @param array $params parameters to be bound to an SQL statement. - * @return CActiveRecord[] list of active records satisfying the specified condition. An empty array is returned if none is found. + * @return static[] list of active records satisfying the specified condition. An empty array is returned if none is found. */ public function findAll($condition='',$params=array()) { @@ -1479,7 +1479,7 @@ abstract class CActiveRecord extends CModel * @param mixed $pk primary key value(s). Use array for multiple primary keys. For composite key, each key value must be an array (column name=>column value). * @param mixed $condition query condition or criteria. * @param array $params parameters to be bound to an SQL statement. - * @return CActiveRecord the record found. Null if none is found. + * @return static the record found. Null if none is found. */ public function findByPk($pk,$condition='',$params=array()) { @@ -1495,7 +1495,7 @@ abstract class CActiveRecord extends CModel * @param mixed $pk primary key value(s). Use array for multiple primary keys. For composite key, each key value must be an array (column name=>column value). * @param mixed $condition query condition or criteria. * @param array $params parameters to be bound to an SQL statement. - * @return CActiveRecord[] the records found. An empty array is returned if none is found. + * @return static[] the records found. An empty array is returned if none is found. */ public function findAllByPk($pk,$condition='',$params=array()) { @@ -1512,7 +1512,7 @@ abstract class CActiveRecord extends CModel * An attribute value can be an array which will be used to generate an IN condition. * @param mixed $condition query condition or criteria. * @param array $params parameters to be bound to an SQL statement. - * @return CActiveRecord the record found. Null if none is found. + * @return static the record found. Null if none is found. */ public function findByAttributes($attributes,$condition='',$params=array()) { @@ -1529,7 +1529,7 @@ abstract class CActiveRecord extends CModel * An attribute value can be an array which will be used to generate an IN condition. * @param mixed $condition query condition or criteria. * @param array $params parameters to be bound to an SQL statement. - * @return CActiveRecord[] the records found. An empty array is returned if none is found. + * @return static[] the records found. An empty array is returned if none is found. */ public function findAllByAttributes($attributes,$condition='',$params=array()) { @@ -1543,7 +1543,7 @@ abstract class CActiveRecord extends CModel * Finds a single active record with the specified SQL statement. * @param string $sql the SQL statement * @param array $params parameters to be bound to the SQL statement - * @return CActiveRecord the record found. Null if none is found. + * @return static the record found. Null if none is found. */ public function findBySql($sql,$params=array()) { @@ -1566,7 +1566,7 @@ abstract class CActiveRecord extends CModel * Finds all active records using the specified SQL statement. * @param string $sql the SQL statement * @param array $params parameters to be bound to the SQL statement - * @return CActiveRecord[] the records found. An empty array is returned if none is found. + * @return static[] the records found. An empty array is returned if none is found. */ public function findAllBySql($sql,$params=array()) { @@ -1703,7 +1703,7 @@ abstract class CActiveRecord extends CModel * ))->findAll(); * * - * @return CActiveRecord the AR object itself. + * @return static the AR object itself. */ public function with() { @@ -1722,7 +1722,7 @@ abstract class CActiveRecord extends CModel * Sets {@link CDbCriteria::together} property to be true. * This is only used in relational AR query. Please refer to {@link CDbCriteria::together} * for more details. - * @return CActiveRecord the AR object itself + * @return static the AR object itself * @since 1.1.4 */ public function together() @@ -1845,7 +1845,7 @@ abstract class CActiveRecord extends CModel * This method is internally used by the find methods. * @param array $attributes attribute values (column name=>column value) * @param boolean $callAfterFind whether to call {@link afterFind} after the record is populated. - * @return CActiveRecord the newly created active record. The class of the object is the same as the model class. + * @return static the newly created active record. The class of the object is the same as the model class. * Null is returned if the input data is false. */ public function populateRecord($attributes,$callAfterFind=true) @@ -1880,7 +1880,7 @@ abstract class CActiveRecord extends CModel * @param boolean $callAfterFind whether to call {@link afterFind} after each record is populated. * @param string $index the name of the attribute whose value will be used as indexes of the query result array. * If null, it means the array will be indexed by zero-based integers. - * @return CActiveRecord[] list of active records. + * @return static[] list of active records. */ public function populateRecords($data,$callAfterFind=true,$index=null) { @@ -1906,7 +1906,7 @@ abstract class CActiveRecord extends CModel * For example, by creating a record based on the value of a column, * you may implement the so-called single-table inheritance mapping. * @param array $attributes list of attribute values for the active records. - * @return CActiveRecord the active record + * @return static the active record */ protected function instantiate($attributes) { diff --git a/framework/db/schema/CDbCriteria.php b/framework/db/schema/CDbCriteria.php index a2333a1ba..86fb1b608 100644 --- a/framework/db/schema/CDbCriteria.php +++ b/framework/db/schema/CDbCriteria.php @@ -213,7 +213,7 @@ class CDbCriteria extends CComponent * After calling this method, the {@link condition} property will be modified. * @param mixed $condition the new condition. It can be either a string or an array of strings. * @param string $operator the operator to join different conditions. Defaults to 'AND'. - * @return CDbCriteria the criteria object itself + * @return static the criteria object itself */ public function addCondition($condition,$operator='AND') { @@ -246,7 +246,7 @@ class CDbCriteria extends CComponent * @param string $operator the operator used to concatenate the new condition with the existing one. * Defaults to 'AND'. * @param string $like the LIKE operator. Defaults to 'LIKE'. You may also set this to be 'NOT LIKE'. - * @return CDbCriteria the criteria object itself + * @return static the criteria object itself */ public function addSearchCondition($column,$keyword,$escape=true,$operator='AND',$like='LIKE') { @@ -269,7 +269,7 @@ class CDbCriteria extends CComponent * @param array $values list of values that the column value should be in * @param string $operator the operator used to concatenate the new condition with the existing one. * Defaults to 'AND'. - * @return CDbCriteria the criteria object itself + * @return static the criteria object itself */ public function addInCondition($column,$values,$operator='AND') { @@ -309,7 +309,7 @@ class CDbCriteria extends CComponent * @param array $values list of values that the column value should not be in * @param string $operator the operator used to concatenate the new condition with the existing one. * Defaults to 'AND'. - * @return CDbCriteria the criteria object itself + * @return static the criteria object itself * @since 1.1.1 */ public function addNotInCondition($column,$values,$operator='AND') @@ -349,7 +349,7 @@ class CDbCriteria extends CComponent * @param string $columnOperator the operator to concatenate multiple column matching condition. Defaults to 'AND'. * @param string $operator the operator used to concatenate the new condition with the existing one. * Defaults to 'AND'. - * @return CDbCriteria the criteria object itself + * @return static the criteria object itself */ public function addColumnCondition($columns,$columnOperator='AND',$operator='AND') { @@ -408,7 +408,7 @@ class CDbCriteria extends CComponent * and _ (matches a single character) will be escaped, and the value will be surrounded with a % * character on both ends. When this parameter is false, the value will be directly used for * matching without any change. - * @return CDbCriteria the criteria object itself + * @return static the criteria object itself * @since 1.1.1 */ public function compare($column, $value, $partialMatch=false, $operator='AND', $escape=true) @@ -462,7 +462,7 @@ class CDbCriteria extends CComponent * @param string $valueEnd the ending value to end the between search. * @param string $operator the operator used to concatenate the new condition with the existing one. * Defaults to 'AND'. - * @return CDbCriteria the criteria object itself + * @return static the criteria object itself * @since 1.1.2 */ public function addBetweenCondition($column,$valueStart,$valueEnd,$operator='AND') diff --git a/framework/web/CClientScript.php b/framework/web/CClientScript.php index 905cd0255..bddaa9160 100644 --- a/framework/web/CClientScript.php +++ b/framework/web/CClientScript.php @@ -554,7 +554,7 @@ class CClientScript extends CApplicationComponent * Registers a script package that is listed in {@link packages}. * This method is the same as {@link registerCoreScript}. * @param string $name the name of the script package. - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). * @since 1.1.7 * @see renderCoreScript */ @@ -566,7 +566,7 @@ class CClientScript extends CApplicationComponent /** * Registers a script package that is listed in {@link packages}. * @param string $name the name of the script package. - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). * @see renderCoreScript */ public function registerCoreScript($name) @@ -601,7 +601,7 @@ class CClientScript extends CApplicationComponent * Registers a CSS file * @param string $url URL of the CSS file * @param string $media media that the CSS file should be applied to. If empty, it means all media types. - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). */ public function registerCssFile($url,$media='') { @@ -617,7 +617,7 @@ class CClientScript extends CApplicationComponent * @param string $id ID that uniquely identifies this piece of CSS code * @param string $css the CSS code * @param string $media media that the CSS code should be applied to. If empty, it means all media types. - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). */ public function registerCss($id,$css,$media='') { @@ -638,7 +638,7 @@ class CClientScript extends CApplicationComponent *
  • CClientScript::POS_END : the script is inserted at the end of the body section.
  • * * @param array $htmlOptions additional HTML attributes - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). */ public function registerScriptFile($url,$position=null,array $htmlOptions=array()) { @@ -672,7 +672,7 @@ class CClientScript extends CApplicationComponent * * @param array $htmlOptions additional HTML attributes * Note: HTML attributes are not allowed for script positions "CClientScript::POS_LOAD" and "CClientScript::POS_READY". - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). */ public function registerScript($id,$script,$position=null,array $htmlOptions=array()) { @@ -712,7 +712,7 @@ class CClientScript extends CApplicationComponent * @param string $httpEquiv http-equiv attribute of the meta tag. If null, the attribute will not be generated * @param array $options other options in name-value pairs (e.g. 'scheme', 'lang') * @param string $id Optional id of the meta tag to avoid duplicates - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). */ public function registerMetaTag($content,$name=null,$httpEquiv=null,$options=array(),$id=null) { @@ -735,7 +735,7 @@ class CClientScript extends CApplicationComponent * @param string $href href attribute of the link tag. If null, the attribute will not be generated. * @param string $media media attribute of the link tag. If null, the attribute will not be generated. * @param array $options other options in name-value pairs - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.5). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.5). */ public function registerLinkTag($relation=null,$type=null,$href=null,$media=null,$options=array()) { @@ -830,7 +830,7 @@ class CClientScript extends CApplicationComponent * @param string $name the name of the script package. * @param array $definition the definition array of the script package, * @see CClientScript::packages. - * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.10). + * @return static the CClientScript object itself (to support method chaining, available since version 1.1.10). * * @since 1.1.9 */ diff --git a/framework/web/widgets/CHtmlPurifier.php b/framework/web/widgets/CHtmlPurifier.php index f893c30ac..23d33d360 100644 --- a/framework/web/widgets/CHtmlPurifier.php +++ b/framework/web/widgets/CHtmlPurifier.php @@ -88,7 +88,7 @@ class CHtmlPurifier extends COutputProcessor /** * Set the options for HTML Purifier and create a new HTML Purifier instance based on these options. * @param mixed $options the options for HTML Purifier - * @return CHtmlPurifier + * @return static the object instance itself */ public function setOptions($options) {