OOP style Save Option Builder.
This allows you to build options to save entities in a OOP style and helps you to avoid mistakes by validating the options as you build them.
ARRAY_AS_PROPS, STD_PROP_LIST __construct( Cake\ORM\Table $table , array $options [] )
Constructor.
Cake\ORM\Table $table $options optional [] ArrayObject::__construct() _associated( Cake\ORM\Table $table , array $associations )
Checks that the associations exists recursively.
Cake\ORM\Table $table $associations _checkAssociation( Cake\ORM\Table $table , string $association )
Checks if an association exists.
Cake\ORM\Table $table $association associated( string|array $associated )
Set associated options.
$associated Cake\ORM\SaveOptionsBuilderatomic( boolean $atomic )
Sets the atomic option.
$atomic Cake\ORM\SaveOptionsBuildercheckExisting( boolean $checkExisting )
Set check existing option.
$checkExisting Cake\ORM\SaveOptionsBuildercheckRules( boolean $checkRules )
Option to check the rules.
$checkRules Cake\ORM\SaveOptionsBuilderguard( boolean $guard )
Set the guard option.
$guard Cake\ORM\SaveOptionsBuilderparseArrayOptions( array $array )
Takes an options array and populates the option object with the data.
This can be used to turn an options array into the object.
$array Cake\ORM\SaveOptionsBuilderset( string $option , mixed $value )
Setting custom options.
$option $value Cake\ORM\SaveOptionsBuildervalidate( string $validate )
Set the validation rule set to use.
$validate Cake\ORM\SaveOptionsBuilder_normalizeAssociations( array $associations )
Returns an array out of the original passed associations list where dot notation is transformed into nested arrays so that they can be parsed by other routines
$associations
© 2005–2018 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.5/class-Cake.ORM.SaveOptionsBuilder.html