Documentation

Schema extends Component
in package
implements ISchema

FinalYes
Tags
author

Ramone Burrell ramone@ramoneburrell.com

since

Version 0.1.0

Table of Contents

Interfaces

ISchema

Properties

$name  : string
$dsn  : IDsn
$hashCode  : int
$hashCounter  : int
$join_scheme  : array<string|int, mixed>
$join_scheme_cache_key  : string
$table_manager  : TableManager
$table_names  : array<string|int, mixed>
$table_names_cache_key  : string
A template for the key to be used in caching the names of the tables that are a part of this schema. Template placeholders will be replaced with values in respects of this schema on initialization of this instance
$tables  : ArrayObject

Methods

__call()  : mixed
__callStatic()  : mixed
__construct()  : mixed
__destruct()  : mixed
__get()  : mixed
buildEntityRelationshipGraph()  : mixed
delete()  : IModel
{@inheritdoc}
extends()  : bool
getConnection()  : IConnection
Gets a database connection by the data source name described by this schema
getDatabase()  : string
getDsn()  : IDsn
getInformationSchema()  : ISchema
getName()  : string
{@inheritdoc}
getReflection()  : ReflectionClass
getRelatedTables()  : array<string|int, mixed>
Gets a list of tables that have a direct relationship with a provided table
getTable()  : ITable
getTableManager()  : TableManager
getTables()  : ArrayObject
read()  : IModel|null
{@inheritdoc}
save()  : void
{@inheritdoc}
tableExists()  : bool
Determines whether or not a table by a particular name exists within this schema.
update()  : IModel
{@inheritdoc}
init()  : mixed
{@inheritdoc}
getTableNames()  : array<string|int, mixed>
Gets a list of the names of the tables that exists within this schema. If the list is empty it will attempt to load it from the information schema associated with schema
setDsn()  : mixed
setName()  : mixed

Properties

$join_scheme

private array<string|int, mixed> $join_scheme

$join_scheme_cache_key

private string $join_scheme_cache_key = 'join_scheme.f5785c35-2cc7-40bf-9439-80eb86adfcc5'

$table_names

private array<string|int, mixed> $table_names = []

$table_names_cache_key

A template for the key to be used in caching the names of the tables that are a part of this schema. Template placeholders will be replaced with values in respects of this schema on initialization of this instance

private string $table_names_cache_key = "<schema_name>.table_names"

Methods

__callStatic()

public static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : mixed
$arguments : array<string|int, mixed>

__get()

public __get(string $property) : mixed
Parameters
$property : string

buildEntityRelationshipGraph()

public buildEntityRelationshipGraph() : mixed

extends()

public extends(ReflectionClass $reflector) : bool
Parameters
$reflector : ReflectionClass
Return values
bool

getConnection()

Gets a database connection by the data source name described by this schema

public getConnection() : IConnection
Return values
IConnection

The database connection to this schema

getReflection()

public getReflection() : ReflectionClass
Return values
ReflectionClass

getRelatedTables()

Gets a list of tables that have a direct relationship with a provided table

public static getRelatedTables(ITable $table) : array<string|int, mixed>
Parameters
$table : ITable

The table to retrieve the related tables for

Return values
array<string|int, mixed>

The set of tables which are directly related to the provided table. Will be empty if the provided table does not have any tables directly related to it

tableExists()

Determines whether or not a table by a particular name exists within this schema.

public tableExists(string $table_name) : bool
Parameters
$table_name : string

The name of the table to check if exists

Tags
see
ISchema::tableExists()
Return values
bool

True if the table exists within this schema, false otherwise

init()

{@inheritdoc}

protected init() : mixed
Tags
see
Component::init()

getTableNames()

Gets a list of the names of the tables that exists within this schema. If the list is empty it will attempt to load it from the information schema associated with schema

private getTableNames() : array<string|int, mixed>
Return values
array<string|int, mixed>

setName()

private setName(string $name) : mixed
Parameters
$name : string

        
On this page

Search results