class Doctrine_Relation_Parser (View source)

Doctrine_Relation_Parser

Properties

protected Doctrine_Table $_table
protected array $_relations
protected array $_pending

Methods

__construct(Doctrine_Table $table)

constructor

array
getPendingRelation($name)

getPendingRelation

array
getPendingRelations()

getPendingRelations

unsetPendingRelations(string $name)

unsetPendingRelations Removes a relation. Warning: this only affects pending relations

boolean
hasRelation(string $name)

Check if a relation alias exists

void
bind($name, $options = array())

binds a relation

getRelation($alias, $recursive = true)

getRelation

array
getRelations()

getRelations returns an array containing all relation objects

getImpl(string $template)

getImpl returns the table class of the concrete implementation for given template if the given template is not a template then this method just returns the table class for the given record

array
completeAssocDefinition(array $def)

Completes the given association definition

getIdentifiers(Doctrine_Table $table)

getIdentifiers gives a list of identifiers from given table

array
guessColumns(array $classes, Doctrine_Table $foreignTable)

guessColumns

array
completeDefinition(array $def)

Completes the given definition

Details

__construct(Doctrine_Table $table)

constructor

Parameters

Doctrine_Table $table the table object this parser belongs to

Doctrine_Table getTable()

getTable

Return Value

Doctrine_Table the table object this parser belongs to

array getPendingRelation($name)

getPendingRelation

Parameters

$name

Return Value

array an array defining a pending relation

array getPendingRelations()

getPendingRelations

Return Value

array an array containing all the pending relations

unsetPendingRelations(string $name)

unsetPendingRelations Removes a relation. Warning: this only affects pending relations

Parameters

string $name relation to remove

boolean hasRelation(string $name)

Check if a relation alias exists

Parameters

string $name

Return Value

boolean $bool

void bind($name, $options = array())

binds a relation

Parameters

$name
$options

Return Value

void

getRelation($alias, $recursive = true)

getRelation

Parameters

$alias
$recursive

array getRelations()

getRelations returns an array containing all relation objects

Return Value

array an array of Doctrine_Relation objects

getImpl(string $template)

getImpl returns the table class of the concrete implementation for given template if the given template is not a template then this method just returns the table class for the given record

Parameters

string $template

array completeAssocDefinition(array $def)

Completes the given association definition

Parameters

array $def definition array to be completed

Return Value

array completed definition array

getIdentifiers(Doctrine_Table $table)

getIdentifiers gives a list of identifiers from given table

the identifiers are in format: [componentName].[identifier]

Parameters

Doctrine_Table $table table object to retrieve identifiers from

array guessColumns(array $classes, Doctrine_Table $foreignTable)

guessColumns

Parameters

array $classes an array of class names
Doctrine_Table $foreignTable foreign table object

Return Value

array an array of column names

array completeDefinition(array $def)

Completes the given definition

Parameters

array $def definition array to be completed

Return Value

array completed definition array