CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 3.8 Red Velvet API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 3.8
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Cake
    • Auth
      • Storage
    • Cache
      • Engine
    • Collection
      • Iterator
    • Command
    • Console
      • Exception
    • Controller
      • Component
      • Exception
    • Core
      • Configure
        • Engine
      • Exception
      • Retry
    • Database
      • Driver
      • Exception
      • Expression
      • Schema
      • Statement
      • Type
    • Datasource
      • Exception
    • Error
      • Middleware
    • Event
      • Decorator
    • Filesystem
    • Form
    • Http
      • Client
        • Adapter
        • Auth
      • Cookie
      • Exception
      • Middleware
      • Session
    • I18n
      • Formatter
      • Middleware
      • Parser
    • Log
      • Engine
    • Mailer
      • Exception
      • Transport
    • Network
      • Exception
    • ORM
      • Association
      • Behavior
        • Translate
      • Exception
      • Locator
      • Rule
    • Routing
      • Exception
      • Filter
      • Middleware
      • Route
    • Shell
      • Helper
      • Task
    • TestSuite
      • Fixture
      • Stub
    • Utility
      • Exception
    • Validation
    • View
      • Exception
      • Form
      • Helper
      • Widget
  • None

Classes

  • ConnectionManager
  • ConnectionRegistry
  • FactoryLocator
  • Paginator
  • QueryCacher
  • ResultSetDecorator
  • RulesChecker

Interfaces

  • ConnectionInterface
  • EntityInterface
  • FixtureInterface
  • InvalidPropertyInterface
  • PaginatorInterface
  • QueryInterface
  • RepositoryInterface
  • ResultSetInterface
  • SchemaInterface
  • TableSchemaInterface

Traits

  • EntityTrait
  • ModelAwareTrait
  • QueryTrait
  • RulesAwareTrait
 1: <?php
 2: /**
 3:  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
 4:  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
 5:  *
 6:  * Licensed under The MIT License
 7:  * For full copyright and license information, please see the LICENSE.txt
 8:  * Redistributions of files must retain the above copyright notice.
 9:  *
10:  * @copyright     Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
11:  * @link          https://cakephp.org CakePHP(tm) Project
12:  * @since         3.1.0
13:  * @license       https://opensource.org/licenses/mit-license.php MIT License
14:  */
15: namespace Cake\Datasource;
16: 
17: /**
18:  * Defines the interface that testing fixtures use.
19:  */
20: interface FixtureInterface
21: {
22:     /**
23:      * Create the fixture schema/mapping/definition
24:      *
25:      * @param \Cake\Datasource\ConnectionInterface $db An instance of the connection the fixture should be created on.
26:      * @return bool True on success, false on failure.
27:      */
28:     public function create(ConnectionInterface $db);
29: 
30:     /**
31:      * Run after all tests executed, should remove the table/collection from the connection.
32:      *
33:      * @param \Cake\Datasource\ConnectionInterface $db An instance of the connection the fixture should be removed from.
34:      * @return bool True on success, false on failure.
35:      */
36:     public function drop(ConnectionInterface $db);
37: 
38:     /**
39:      * Run before each test is executed.
40:      *
41:      * Should insert all the records into the test database.
42:      *
43:      * @param \Cake\Datasource\ConnectionInterface $db An instance of the connection into which the records will be inserted.
44:      * @return \Cake\Database\StatementInterface|bool on success or if there are no records to insert, or false on failure.
45:      */
46:     public function insert(ConnectionInterface $db);
47: 
48:     /**
49:      * Build and execute SQL queries necessary to create the constraints for the
50:      * fixture
51:      *
52:      * @param \Cake\Datasource\ConnectionInterface $db An instance of the database into which the constraints will be created
53:      * @return bool on success or if there are no constraints to create, or false on failure
54:      */
55:     public function createConstraints(ConnectionInterface $db);
56: 
57:     /**
58:      * Build and execute SQL queries necessary to drop the constraints for the
59:      * fixture
60:      *
61:      * @param \Cake\Datasource\ConnectionInterface $db An instance of the database into which the constraints will be dropped
62:      * @return bool on success or if there are no constraints to drop, or false on failure
63:      */
64:     public function dropConstraints(ConnectionInterface $db);
65: 
66:     /**
67:      * Truncates the current fixture.
68:      *
69:      * @param \Cake\Datasource\ConnectionInterface $db A reference to a db instance
70:      * @return bool
71:      */
72:     public function truncate(ConnectionInterface $db);
73: 
74:     /**
75:      * Get the connection name this fixture should be inserted into.
76:      *
77:      * @return string
78:      */
79:     public function connection();
80: 
81:     /**
82:      * Get the table/collection name for this fixture.
83:      *
84:      * @return string
85:      */
86:     public function sourceName();
87: }
88: 
Follow @CakePHP
#IRC
OpenHub
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Logos & Trademarks
  • Community
  • Team
  • Issues (Github)
  • YouTube Channel
  • Get Involved
  • Bakery
  • Featured Resources
  • Newsletter
  • Certification
  • My CakePHP
  • CakeFest
  • Facebook
  • Twitter
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs