Fr3nch13/CakePHP Utilities

ConstraintsInterface

Defines the interface for a fixture that needs to manage constraints.

If an implementation of Cake\Datasource\FixtureInterface also implements this interface, the FixtureManager will use these methods to manage a fixtures constraints.

Table of Contents

Methods

createConstraints()  : bool
Build and execute SQL queries necessary to create the constraints for the fixture
dropConstraints()  : bool
Build and execute SQL queries necessary to drop the constraints for the fixture

Methods

createConstraints()

Build and execute SQL queries necessary to create the constraints for the fixture

public createConstraints(ConnectionInterface $connection) : bool
Parameters
$connection : ConnectionInterface

An instance of the database into which the constraints will be created.

Return values
bool

on success or if there are no constraints to create, or false on failure

dropConstraints()

Build and execute SQL queries necessary to drop the constraints for the fixture

public dropConstraints(ConnectionInterface $connection) : bool
Parameters
$connection : ConnectionInterface

An instance of the database into which the constraints will be dropped.

Return values
bool

on success or if there are no constraints to drop, or false on failure


        
On this page

Search results