ICanBoogie
  • Documentation
  • API Reference
  • ActiveRecord 4.0.x
Namespaces
  • ICanBoogie
    • ActiveRecord
      • ActiveRecordCache
      • Driver
      • Property
      • Validate
        • Reader
        • Validator
        • ValidatorProvider
Classes
  • BelongsToRelation
  • Connection
  • ConnectionCollection
  • ConnectionOptions
  • HasManyRelation
  • Model
  • ModelCollection
  • ModelProvider
  • Query
  • Relation
  • RelationCollection
  • RelationNotDefined
  • Schema
  • SchemaColumn
  • Statement
  • Table
Interfaces
  • ActiveRecordCache
  • Driver
  • Exception
Exceptions
  • ActiveRecordClassNotValid
  • ConnectionAlreadyEstablished
  • ConnectionNotDefined
  • ConnectionNotEstablished
  • DriverNotDefined
  • ModelAlreadyInstantiated
  • ModelNotDefined
  • RecordNotFound
  • RecordNotValid
  • ScopeNotDefined
  • StatementInvocationFailed
  • StatementNotValid
  • UnableToSetFetchMode

Class Schema

Representation of a database table schema.

ICanBoogie\ActiveRecord\Schema implements ArrayAccess, IteratorAggregate uses ICanBoogie\Accessor\AccessorTrait (not available)
Namespace: ICanBoogie\ActiveRecord
Located at ActiveRecord/Schema.php

Methods summary

protected get_columns( void ) : ICanBoogie\ActiveRecord\SchemaColumn[]

Returns

ICanBoogie\ActiveRecord\SchemaColumn[]
protected get_primary( void ) : array|string|null

Returns the primary key of the schema.

Returns the primary key of the schema.

Returns

array|string|null
A multi-dimensional primary key is returned as an array.
protected get_indexes( void ) : array

Returns the indexes of the schema.

Returns the indexes of the schema.

Returns

array
protected get_unique_indexes( void ) : array

Returns unique indexes.

Returns unique indexes.

Returns

array
public __construct( array $options )

Parameters

$options
Schema options.
public offsetExists( string $column_id ) : boolean

Checks if a column exists.

Checks if a column exists.

Parameters

$column_id
Column identifier.

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public offsetGet( string $column_id ) : ICanBoogie\ActiveRecord\SchemaColumn

Returns a column.

Returns a column.

Parameters

$column_id

Returns

ICanBoogie\ActiveRecord\SchemaColumn

Throws

ICanBoogie\OffsetNotDefined
if the column is not defined.

Implementation of

ArrayAccess::offsetGet()
public offsetSet( string $column_id, string|array|ICanBoogie\ActiveRecord\SchemaColumn $column_options )

Adds a column to the schema.

Adds a column to the schema.

Parameters

$column_id
$column_options

Implementation of

ArrayAccess::offsetSet()
public offsetUnset( string $column_id )

Removes a column from the schema.

Removes a column from the schema.

Parameters

$column_id

Implementation of

ArrayAccess::offsetUnset()
public getIterator( void ) : ArrayIterator

Returns columns iterator.

Returns columns iterator.

Returns

ArrayIterator

Implementation of

IteratorAggregate::getIterator()
public filter( array $values ) : array

Filters values according to the schema columns.

Filters values according to the schema columns.

Parameters

$values

Returns

array

Properties summary

protected $columns : ICanBoogie\ActiveRecord\SchemaColumn[]
[]

Magic properties

public read-only $columns : ICanBoogie\ActiveRecord\SchemaColumn[]

The columns of the schema.

public read-only $indexes : array

The indexes of the schema.

public read-only $unique_indexes : array

The unique indexes of the schema.

public read-only $primary : array|string

The primary key of the schema. The primary key is an array if it uses multiple columns.

ActiveRecord 4.0.x – Check on GitHub – API documentation generated by ApiGen