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

  • Connection
  • Driver
  • FieldTypeConverter
  • FunctionsBuilder
  • Query
  • SchemaCache
  • Type
  • TypeMap

Interfaces

  • DriverInterface
  • ExpressionInterface
  • StatementInterface
  • TypedResultInterface
  • TypeInterface

Traits

  • SqlDialectTrait
  • TypeConverterTrait
  • TypedResultTrait
  • TypeMapTrait

Exceptions

  • Exception
 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.2.14
13:  * @license       https://opensource.org/licenses/mit-license.php MIT License
14:  */
15: namespace Cake\Database;
16: 
17: /**
18:  * Encapsulates all conversion functions for values coming from a database into PHP and
19:  * going from PHP into a database.
20:  */
21: interface TypeInterface
22: {
23:     /**
24:      * Casts given value from a PHP type to one acceptable by a database.
25:      *
26:      * @param mixed $value Value to be converted to a database equivalent.
27:      * @param \Cake\Database\Driver $driver Object from which database preferences and configuration will be extracted.
28:      * @return mixed Given PHP type casted to one acceptable by a database.
29:      */
30:     public function toDatabase($value, Driver $driver);
31: 
32:     /**
33:      * Casts given value from a database type to a PHP equivalent.
34:      *
35:      * @param mixed $value Value to be converted to PHP equivalent
36:      * @param \Cake\Database\Driver $driver Object from which database preferences and configuration will be extracted
37:      * @return mixed Given value casted from a database to a PHP equivalent.
38:      */
39:     public function toPHP($value, Driver $driver);
40: 
41:     /**
42:      * Casts given value to its Statement equivalent.
43:      *
44:      * @param mixed $value Value to be converted to PDO statement.
45:      * @param \Cake\Database\Driver $driver Object from which database preferences and configuration will be extracted.
46:      * @return mixed Given value casted to its Statement equivalent.
47:      */
48:     public function toStatement($value, Driver $driver);
49: 
50:     /**
51:      * Marshals flat data into PHP objects.
52:      *
53:      * Most useful for converting request data into PHP objects,
54:      * that make sense for the rest of the ORM/Database layers.
55:      *
56:      * @param mixed $value The value to convert.
57:      * @return mixed Converted value.
58:      */
59:     public function marshal($value);
60: 
61:     /**
62:      * Returns the base type name that this class is inheriting.
63:      *
64:      * This is useful when extending base type for adding extra functionality,
65:      * but still want the rest of the framework to use the same assumptions it would
66:      * do about the base type it inherits from.
67:      *
68:      * @return string The base type name that this class is inheriting.
69:      */
70:     public function getBaseType();
71: 
72:     /**
73:      * Returns type identifier name for this object.
74:      *
75:      * @return string The type identifier name for this object.
76:      */
77:     public function getName();
78: 
79:     /**
80:      * Generate a new primary key value for a given type.
81:      *
82:      * This method can be used by types to create new primary key values
83:      * when entities are inserted.
84:      *
85:      * @return mixed A new primary key value.
86:      * @see \Cake\Database\Type\UuidType
87:      */
88:     public function newId();
89: }
90: 
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