Checks that the value provided in a field exists as the primary key of another table.
__construct( string|array $fields , object|string $repository )
Constructor.
$fields
$repository
__invoke( Cake\Datasource\EntityInterface $entity , array $options )
Performs the existence check
Cake\Datasource\EntityInterface
$entity
$options
repository
key is required.boolean
RuntimeException
_fieldsAreNull( Cake\ORM\EntityInterface $entity , Cake\ORM\Table $source )
Check whether or not the entity fields are nullable and null.
$entity
Cake\ORM\Table
$source
boolean
© 2005–2016 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.
http://api.cakephp.org/3.1/class-Cake.ORM.Rule.ExistsIn.html