PHP Class Bravo3\Orm\Mappers\Yaml\YamlMapper

Inheritance: extends Bravo3\Orm\Mappers\AbstractMapper, implements Bravo3\Orm\Mappers\DereferencingMapperInterface
Afficher le fichier Open project: bravo3/orm

Protected Properties

Свойство Type Description
$entities Bravo3\Orm\Mappers\Metadata\Entity[]

Méthodes publiques

Méthode Description
__construct ( array $maps = [] )
getClassFromTable ( string $table_name ) : string Get an entities full class name from its table name
getEntityMetadata ( string | object $entity ) : Entity Get the metadata for an entity, including column information
registerMap ( string $fn ) Register a new map file

Méthodes protégées

Méthode Description
getNode ( array $map, string $node, boolean $required = true, mixed $default = null ) : mixed Get a node from the metadata map
getParser ( ) : Symfony\Component\Yaml\Yaml Lazy-load the YAML parser
loadMap ( string $fn ) Parse a map file, loading metadata from YAML
processMaps ( ) Process all unprocessed map files

Private Methods

Méthode Description
createColumn ( string $property, array $column_schema ) : Column Create a column from schema
createRelationship ( string $property, array $column_schema ) : Relationship Create a relationship from schema
createSortables ( array $column_schema ) : Sortable[] Create a set of sortables

Method Details

__construct() public méthode

public __construct ( array $maps = [] )
$maps array

getClassFromTable() public méthode

Get an entities full class name from its table name
public getClassFromTable ( string $table_name ) : string
$table_name string
Résultat string

getEntityMetadata() public méthode

If you do not provide a $relative_mapper then relationship metadata will not be hydrated.
public getEntityMetadata ( string | object $entity ) : Entity
$entity string | object Entity or class name of the entity
Résultat Bravo3\Orm\Mappers\Metadata\Entity

getNode() protected méthode

Get a node from the metadata map
protected getNode ( array $map, string $node, boolean $required = true, mixed $default = null ) : mixed
$map array
$node string
$required boolean
$default mixed
Résultat mixed

getParser() protected méthode

Lazy-load the YAML parser
protected getParser ( ) : Symfony\Component\Yaml\Yaml
Résultat Symfony\Component\Yaml\Yaml

loadMap() protected méthode

Parse a map file, loading metadata from YAML
protected loadMap ( string $fn )
$fn string

processMaps() protected méthode

Process all unprocessed map files
protected processMaps ( )

registerMap() public méthode

Register a new map file
public registerMap ( string $fn )
$fn string

Property Details

$entities protected_oe property

protected Entity[],Bravo3\Orm\Mappers\Metadata $entities
Résultat Bravo3\Orm\Mappers\Metadata\Entity[]