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

  • BaseSchema
  • CachedCollection
  • Collection
  • MysqlSchema
  • PostgresSchema
  • SqliteSchema
  • SqlserverSchema
  • TableSchema

Interfaces

  • SqlGeneratorInterface
  • TableSchemaAwareInterface
  • TableSchemaInterface

Class Collection

Represents a database schema collection

Used to access information about the tables, and other data in a database.

Direct Subclasses
  • Cake\Database\Schema\CachedCollection
Namespace: Cake\Database\Schema
Location: Database/Schema/Collection.php

Properties summary

  • $_connection protected
    Cake\Database\Connection
    Connection object
  • $_dialect protected
    Cake\Database\Schema\BaseSchema
    Schema dialect instance.

Method Summary

  • __construct() public
    Constructor.
  • _reflect() protected
    Helper method for running each step of the reflection process.
  • describe() public
    Get the column metadata for a table.
  • listTables() public
    Get the list of tables available in the current connection.

Method Detail

__construct() public ¶

__construct( Cake\Database\Connection $connection )

Constructor.

Parameters
Cake\Database\Connection $connection
The connection instance.

_reflect() protected ¶

_reflect( string $stage , string $name , array $config , Cake\Database\Schema\TableSchema $schema )

Helper method for running each step of the reflection process.

Parameters
string $stage
The stage name.
string $name
The table name.
array $config
The config data.
Cake\Database\Schema\TableSchema $schema
The table instance
Throws
Cake\Database\Exception
on query failure.

describe() public ¶

describe( string $name , array $options = [] )

Get the column metadata for a table.

The name can include a database schema name in the form 'schema.table'.

Caching will be applied if cacheMetadata key is present in the Connection configuration options. Defaults to cake_model when true.

Options

  • forceRefresh - Set to true to force rebuilding the cached metadata. Defaults to false.
Parameters
string $name
The name of the table to describe.
array $options optional []
The options to use, see above.
Returns
Cake\Database\Schema\TableSchema
Object with column metadata.
Throws
Cake\Database\Exception
when table cannot be described.

listTables() public ¶

listTables( )

Get the list of tables available in the current connection.

Returns
array
The list of tables in the connected database/schema.

Properties detail

$_connection ¶

protected Cake\Database\Connection

Connection object

$_dialect ¶

protected Cake\Database\Schema\BaseSchema

Schema dialect instance.

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