ICanBoogie/ActiveRecord master
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • ActiveRecord
      • Driver

Classes

  • ActiveRecordCacheBase
  • BelongsToRelation
  • Connection
  • ConnectionCollection
  • ConnectionOptions
  • DateTimePropertySupport
  • HasManyRelation
  • Helpers
  • Model
  • ModelCollection
  • Query
  • Relation
  • RelationCollection
  • RelationNotDefined
  • RuntimeActiveRecordCache
  • Schema
  • SchemaColumn
  • Statement
  • Table

Interfaces

  • ActiveRecordCache
  • Driver
  • Exception

Traits

  • CreatedAtProperty
  • DateProperty
  • DateTimeProperty
  • FinishAtProperty
  • FinishedAtProperty
  • StartAtProperty
  • StartedAtProperty
  • UpdatedAtProperty

Exceptions

  • ActiveRecordClassNotValid
  • ConnectionAlreadyEstablished
  • ConnectionNotDefined
  • ConnectionNotEstablished
  • DriverNotDefined
  • ModelAlreadyInstantiated
  • ModelNotDefined
  • RecordNotFound
  • ScopeNotDefined
  • StatementInvocationFailed
  • StatementNotValid
  • UnableToSetFetchMode

Functions

  • extract_charset_and_collate
  • get_model

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 ICanBoogie\ActiveRecord\SchemaColumn[]
# get_columns( )

Returns

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

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 array
# get_indexes( )

Returns the indexes of the schema.

Returns the indexes of the schema.

Returns

array
protected array
# get_unique_indexes( )

Returns unique indexes.

Returns unique indexes.

Returns

array
public
# __construct( array $options )

Parameters

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

Checks if a column exists.

Checks if a column exists.

Parameters

$column_id
Column identifier.

Returns

boolean

Implementation of

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

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 ArrayIterator
# getIterator( )

Returns columns iterator.

Returns columns iterator.

Returns

ArrayIterator

Implementation of

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

Filters values according to the schema columns.

Filters values according to the schema columns.

Parameters

$values

Returns

array

Properties summary

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

Magic properties

public read-only array $indexes

The indexes of the schema.

public read-only array $unique_indexes

The unique indexes of the schema.

public read-only array|string $primary

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

ICanBoogie/ActiveRecord master API documentation generated by ApiGen