mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 20:42:42 +00:00
Update Model/Behaviors callback signature to be PHP5.4+ compliant.
This commit is contained in:
parent
77c453b2a3
commit
c524645738
6 changed files with 33 additions and 14 deletions
|
@ -141,9 +141,11 @@ class ModelBehavior extends Object {
|
|||
* will allow you to make the validation fail.
|
||||
*
|
||||
* @param Model $model Model using this behavior
|
||||
* @param array $options Options passed from Model::save().
|
||||
* @return mixed False or null will abort the operation. Any other result will continue.
|
||||
* @see Model::save()
|
||||
*/
|
||||
public function beforeValidate(Model $model) {
|
||||
public function beforeValidate(Model $model, $options = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -163,9 +165,11 @@ class ModelBehavior extends Object {
|
|||
* will abort the save operation.
|
||||
*
|
||||
* @param Model $model Model using this behavior
|
||||
* @param array $options Options passed from Model::save().
|
||||
* @return mixed False if the operation should abort. Any other result will continue.
|
||||
* @see Model::save()
|
||||
*/
|
||||
public function beforeSave(Model $model) {
|
||||
public function beforeSave(Model $model, $options = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue