mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing doc block @link tags in Model class.
This commit is contained in:
parent
1ae922cea1
commit
63fcd225ac
1 changed files with 51 additions and 48 deletions
|
@ -50,7 +50,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var string
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/435/useDbConfig
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#useDbConfig-1058
|
||||
*/
|
||||
var $useDbConfig = 'default';
|
||||
|
||||
|
@ -59,7 +59,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var string
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/436/useTable
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#useTable-1059
|
||||
*/
|
||||
var $useTable = null;
|
||||
|
||||
|
@ -68,7 +68,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var string
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/438/displayField
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#displayField-1062
|
||||
*/
|
||||
var $displayField = null;
|
||||
|
||||
|
@ -86,7 +86,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/441/data
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#data-1065
|
||||
*/
|
||||
var $data = array();
|
||||
|
||||
|
@ -103,7 +103,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var string
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/437/primaryKey
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#primaryKey-1061
|
||||
*/
|
||||
var $primaryKey = null;
|
||||
|
||||
|
@ -112,7 +112,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access protected
|
||||
* @link http://book.cakephp.org/view/442/_schema
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#_schema-1066
|
||||
*/
|
||||
var $_schema = null;
|
||||
|
||||
|
@ -122,8 +122,8 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/443/validate
|
||||
* @link http://book.cakephp.org/view/125/Data-Validation
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#validate-1067
|
||||
* @link http://book.cakephp.org/view/1143/Data-Validation
|
||||
*/
|
||||
var $validate = array();
|
||||
|
||||
|
@ -132,7 +132,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/410/Validating-Data-from-the-Controller
|
||||
* @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller
|
||||
*/
|
||||
var $validationErrors = array();
|
||||
|
||||
|
@ -141,7 +141,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var string
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/475/tablePrefix
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#tablePrefix-1060
|
||||
*/
|
||||
var $tablePrefix = null;
|
||||
|
||||
|
@ -150,7 +150,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var string
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/444/name
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#name-1068
|
||||
*/
|
||||
var $name = null;
|
||||
|
||||
|
@ -192,7 +192,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var boolean
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/445/cacheQueries
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#cacheQueries-1069
|
||||
*/
|
||||
var $cacheQueries = false;
|
||||
|
||||
|
@ -201,7 +201,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/81/belongsTo
|
||||
* @link http://book.cakephp.org/view/1042/belongsTo
|
||||
*/
|
||||
var $belongsTo = array();
|
||||
|
||||
|
@ -210,7 +210,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/80/hasOne
|
||||
* @link http://book.cakephp.org/view/1041/hasOne
|
||||
*/
|
||||
var $hasOne = array();
|
||||
|
||||
|
@ -219,7 +219,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/82/hasMany
|
||||
* @link http://book.cakephp.org/view/1043/hasMany
|
||||
*/
|
||||
var $hasMany = array();
|
||||
|
||||
|
@ -228,7 +228,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
|
||||
* @link http://book.cakephp.org/view/1044/hasAndBelongsToMany-HABTM
|
||||
*/
|
||||
var $hasAndBelongsToMany = array();
|
||||
|
||||
|
@ -240,7 +240,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var array
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/90/Using-Behaviors
|
||||
* @link http://book.cakephp.org/view/1072/Using-Behaviors
|
||||
*/
|
||||
var $actsAs = null;
|
||||
|
||||
|
@ -282,7 +282,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var integer
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/439/recursive
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#recursive-1063
|
||||
*/
|
||||
var $recursive = 1;
|
||||
|
||||
|
@ -294,7 +294,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @var string
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/440/order
|
||||
* @link http://book.cakephp.org/view/1057/Model-Attributes#order-1064
|
||||
*/
|
||||
var $order = null;
|
||||
|
||||
|
@ -531,7 +531,7 @@ class Model extends Overloadable {
|
|||
* @param boolean $reset Set to false to make the binding permanent
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/86/Creating-and-Destroying-Associations-on-the-Fly
|
||||
* @link http://book.cakephp.org/view/1045/Creating-and-Destroying-Associations-on-the-Fly
|
||||
*/
|
||||
function bindModel($params, $reset = true) {
|
||||
foreach ($params as $assoc => $model) {
|
||||
|
@ -570,7 +570,7 @@ class Model extends Overloadable {
|
|||
* @param boolean $reset Set to false to make the unbinding permanent
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/86/Creating-and-Destroying-Associations-on-the-Fly
|
||||
* @link http://book.cakephp.org/view/1045/Creating-and-Destroying-Associations-on-the-Fly
|
||||
*/
|
||||
function unbindModel($params, $reset = true) {
|
||||
foreach ($params as $assoc => $models) {
|
||||
|
@ -795,6 +795,7 @@ class Model extends Overloadable {
|
|||
* @param string $two Value string for the alternative indata method
|
||||
* @return array Data with all of $one's keys and values
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/1031/Saving-Your-Data
|
||||
*/
|
||||
function set($one, $two = null) {
|
||||
if (!$one) {
|
||||
|
@ -1076,7 +1077,7 @@ class Model extends Overloadable {
|
|||
* @param boolean $filterKey If true, overwrites any primary key input with an empty value
|
||||
* @return array The current Model::data; after merging $data and/or defaults from database
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/75/Saving-Your-Data
|
||||
* @link http://book.cakephp.org/view/1031/Saving-Your-Data
|
||||
*/
|
||||
function create($data = array(), $filterKey = false) {
|
||||
$defaults = array();
|
||||
|
@ -1107,6 +1108,7 @@ class Model extends Overloadable {
|
|||
* @param mixed $id The ID of the record to read
|
||||
* @return array Array of database fields, or false if not found
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/1017/Retrieving-Your-Data#read-1029
|
||||
*/
|
||||
function read($fields = null, $id = null) {
|
||||
$this->validationErrors = array();
|
||||
|
@ -1141,7 +1143,7 @@ class Model extends Overloadable {
|
|||
* @param string $order SQL ORDER BY fragment
|
||||
* @return string field contents, or false if not found
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/453/field
|
||||
* @link http://book.cakephp.org/view/1017/Retrieving-Your-Data#field-1028
|
||||
*/
|
||||
function field($name, $conditions = null, $order = null) {
|
||||
if ($conditions === null && $this->id !== false) {
|
||||
|
@ -1182,7 +1184,7 @@ class Model extends Overloadable {
|
|||
* @return boolean See Model::save()
|
||||
* @access public
|
||||
* @see Model::save()
|
||||
* @link http://book.cakephp.org/view/75/Saving-Your-Data
|
||||
* @link http://book.cakephp.org/view/1031/Saving-Your-Data
|
||||
*/
|
||||
function saveField($name, $value, $validate = false) {
|
||||
$id = $this->id;
|
||||
|
@ -1207,7 +1209,7 @@ class Model extends Overloadable {
|
|||
* @param array $fieldList List of fields to allow to be written
|
||||
* @return mixed On success Model::$data if its not empty or true, false on failure
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/75/Saving-Your-Data
|
||||
* @link http://book.cakephp.org/view/1031/Saving-Your-Data
|
||||
*/
|
||||
function save($data = null, $validate = true, $fieldList = array()) {
|
||||
$defaults = array('validate' => true, 'fieldList' => array(), 'callbacks' => true);
|
||||
|
@ -1523,7 +1525,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param array $data The fields of the record that will be updated
|
||||
* @return array Returns updated foreign key values, along with an 'old' key containing the old
|
||||
* values, or empty if no foreign keys are updated.
|
||||
* values, or empty if no foreign keys are updated.
|
||||
* @access protected
|
||||
*/
|
||||
function _prepareUpdateFields($data) {
|
||||
|
@ -1563,11 +1565,11 @@ class Model extends Overloadable {
|
|||
* records of the same type), or an array indexed by association name.
|
||||
* @param array $options Options to use when saving record data, See $options above.
|
||||
* @return mixed If atomic: True on success, or false on failure.
|
||||
* Otherwise: array similar to the $data array passed, but values are set to true/false
|
||||
* depending on whether each record saved successfully.
|
||||
* Otherwise: array similar to the $data array passed, but values are set to true/false
|
||||
* depending on whether each record saved successfully.
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
|
||||
* @link http://book.cakephp.org/view/75/Saving-Your-Data
|
||||
* @link http://book.cakephp.org/view/1032/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
|
||||
* @link http://book.cakephp.org/view/1031/Saving-Your-Data
|
||||
*/
|
||||
function saveAll($data = null, $options = array()) {
|
||||
if (empty($data)) {
|
||||
|
@ -1764,7 +1766,7 @@ class Model extends Overloadable {
|
|||
* @param mixed $conditions Conditions to match, true for all records
|
||||
* @return boolean True on success, false on failure
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/75/Saving-Your-Data
|
||||
* @link http://book.cakephp.org/view/1031/Saving-Your-Data
|
||||
*/
|
||||
function updateAll($fields, $conditions = true) {
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
|
@ -1778,7 +1780,7 @@ class Model extends Overloadable {
|
|||
* @param boolean $cascade Set to true to delete records that depend on this record
|
||||
* @return boolean True on success
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/690/del
|
||||
* @link http://book.cakephp.org/view/1036/delete
|
||||
*/
|
||||
function delete($id = null, $cascade = true) {
|
||||
if (!empty($id)) {
|
||||
|
@ -1890,7 +1892,7 @@ class Model extends Overloadable {
|
|||
* @param boolean $callbacks Run callbacks (not being used)
|
||||
* @return boolean True on success, false on failure
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/692/deleteAll
|
||||
* @link http://book.cakephp.org/view/1038/deleteAll
|
||||
*/
|
||||
function deleteAll($conditions, $cascade = true, $callbacks = false) {
|
||||
if (empty($conditions)) {
|
||||
|
@ -2014,7 +2016,7 @@ class Model extends Overloadable {
|
|||
* @param integer $recursive The number of levels deep to fetch associated records
|
||||
* @return array Array of records
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/449/find
|
||||
* @link http://book.cakephp.org/view/1018/find
|
||||
*/
|
||||
function find($conditions = null, $fields = array(), $order = null, $recursive = null) {
|
||||
if (!is_string($conditions) || (is_string($conditions) && !array_key_exists($conditions, $this->_findMethods))) {
|
||||
|
@ -2405,7 +2407,7 @@ class Model extends Overloadable {
|
|||
* @param string $sql SQL statement
|
||||
* @return array Resultset
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/456/query
|
||||
* @link http://book.cakephp.org/view/1027/query
|
||||
*/
|
||||
function query() {
|
||||
$params = func_get_args();
|
||||
|
@ -2422,7 +2424,7 @@ class Model extends Overloadable {
|
|||
* @param string $options An optional array of custom options to be made available in the beforeValidate callback
|
||||
* @return boolean True if there are no errors
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/410/Validating-Data-from-the-Controller
|
||||
* @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller
|
||||
*/
|
||||
function validates($options = array()) {
|
||||
$errors = $this->invalidFields($options);
|
||||
|
@ -2442,7 +2444,7 @@ class Model extends Overloadable {
|
|||
* @return array Array of invalid fields
|
||||
* @see Model::validates()
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/410/Validating-Data-from-the-Controller
|
||||
* @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller
|
||||
*/
|
||||
function invalidFields($options = array()) {
|
||||
if (
|
||||
|
@ -2632,7 +2634,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param string $field The name of the field to invalidate
|
||||
* @param mixed $value Name of validation rule that was not failed, or validation message to
|
||||
* be returned. If no validation key is provided, defaults to true.
|
||||
* be returned. If no validation key is provided, defaults to true.
|
||||
* @access public
|
||||
*/
|
||||
function invalidate($field, $value = true) {
|
||||
|
@ -2660,7 +2662,8 @@ class Model extends Overloadable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Escapes the field name and prepends the model name. Escaping is done according to the current database driver's rules.
|
||||
* Escapes the field name and prepends the model name. Escaping is done according to the
|
||||
* current database driver's rules.
|
||||
*
|
||||
* @param string $field Field to escape (e.g: id)
|
||||
* @param string $alias Alias for the model (e.g: Post)
|
||||
|
@ -2882,7 +2885,7 @@ class Model extends Overloadable {
|
|||
* @return mixed true if the operation should continue, false if it should abort; or, modified
|
||||
* $queryData to continue with new $queryData
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/680/beforeFind
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#beforeFind-1049
|
||||
*/
|
||||
function beforeFind($queryData) {
|
||||
return true;
|
||||
|
@ -2896,7 +2899,7 @@ class Model extends Overloadable {
|
|||
* @param boolean $primary Whether this model is being queried directly (vs. being queried as an association)
|
||||
* @return mixed Result of the find operation
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/681/afterFind
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#afterFind-1050
|
||||
*/
|
||||
function afterFind($results, $primary = false) {
|
||||
return $results;
|
||||
|
@ -2908,7 +2911,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @return boolean True if the operation should continue, false if it should abort
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/683/beforeSave
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#beforeSave-1052
|
||||
*/
|
||||
function beforeSave($options = array()) {
|
||||
return true;
|
||||
|
@ -2919,7 +2922,7 @@ class Model extends Overloadable {
|
|||
*
|
||||
* @param boolean $created True if this save created a new record
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/684/afterSave
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#afterSave-1053
|
||||
*/
|
||||
function afterSave($created) {
|
||||
}
|
||||
|
@ -2930,7 +2933,7 @@ class Model extends Overloadable {
|
|||
* @param boolean $cascade If true records that depend on this record will also be deleted
|
||||
* @return boolean True if the operation should continue, false if it should abort
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/685/beforeDelete
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#beforeDelete-1054
|
||||
*/
|
||||
function beforeDelete($cascade = true) {
|
||||
return true;
|
||||
|
@ -2940,7 +2943,7 @@ class Model extends Overloadable {
|
|||
* Called after every deletion operation.
|
||||
*
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/686/afterDelete
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#afterDelete-1055
|
||||
*/
|
||||
function afterDelete() {
|
||||
}
|
||||
|
@ -2952,7 +2955,7 @@ class Model extends Overloadable {
|
|||
* @return boolean True if validate operation should continue, false to abort
|
||||
* @param $options array Options passed from model::save(), see $options of model::save().
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/682/beforeValidate
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#beforeValidate-1051
|
||||
*/
|
||||
function beforeValidate($options = array()) {
|
||||
return true;
|
||||
|
@ -2962,7 +2965,7 @@ class Model extends Overloadable {
|
|||
* Called when a DataSource-level error occurs.
|
||||
*
|
||||
* @access public
|
||||
* @link http://book.cakephp.org/view/687/onError
|
||||
* @link http://book.cakephp.org/view/1048/Callback-Methods#onError-1056
|
||||
*/
|
||||
function onError() {
|
||||
}
|
||||
|
@ -2971,7 +2974,7 @@ class Model extends Overloadable {
|
|||
* Private method. Clears cache for this model.
|
||||
*
|
||||
* @param string $type If null this deletes cached views if Cache.check is true
|
||||
* Will be used to allow deleting query cache also
|
||||
* Will be used to allow deleting query cache also
|
||||
* @return boolean true on delete
|
||||
* @access protected
|
||||
* @todo
|
||||
|
|
Loading…
Reference in a new issue