PHP Class Bravo3\Orm\Mappers\Yaml\YamlMapWriter

Inheritance: extends Bravo3\Orm\Mappers\Portation\AbstractMapWriter
Show file Open project: bravo3/orm

Protected Properties

Property Type Description
$indent_spaces integer
$inline_level integer
$main_buffer array
$output_fn string
$sub_buffers array

Public Methods

Method Description
__construct ( string $output = null )
compileMetadataForEntity ( object $entity, string | null $resource = null ) : void Write metadata for a given entity, using the input EntityManager that must be preset
flush ( ) : void Compile and write all processed metadata
getIndentSpaces ( ) : integer Get the number of spaces for YAML indenting
getInlineLevel ( ) : integer Get the YAML indent level in which formatting is switched to inline
purge ( ) : void Purge the current buffer of unwritten content
setIndentSpaces ( integer $indent_spaces ) Set the number of spaces for YAML indenting
setInlineLevel ( integer $inline_level ) Set the YAML indent level in which formatting is switched to inline

Private Methods

Method Description
compileColumns ( Entity $md ) : array Compiles all columns for an entity
compileConditions ( array $conditions ) : array Compile conditions into an array
compileSortIndices ( Entity $md ) : array Compile all sortable table indices
compileSortables ( array $sortables ) : array Compile sortables into an array
compileStdIndices ( Entity $md ) : array Compile normal indices
writeYaml ( string $fn, array $data ) Write YAML data to a file, overwriting its contents

Method Details

__construct() public method

public __construct ( string $output = null )
$output string Primary output file

compileMetadataForEntity() public method

Write metadata for a given entity, using the input EntityManager that must be preset
public compileMetadataForEntity ( object $entity, string | null $resource = null ) : void
$entity object Entity with existing mapping data
$resource string | null File name to write data, if null a default or common value will be used
return void

flush() public method

Compile and write all processed metadata
public flush ( ) : void
return void

getIndentSpaces() public method

Get the number of spaces for YAML indenting
public getIndentSpaces ( ) : integer
return integer

getInlineLevel() public method

Get the YAML indent level in which formatting is switched to inline
public getInlineLevel ( ) : integer
return integer

purge() public method

Purge the current buffer of unwritten content
public purge ( ) : void
return void

setIndentSpaces() public method

Set the number of spaces for YAML indenting
public setIndentSpaces ( integer $indent_spaces )
$indent_spaces integer

setInlineLevel() public method

Set the YAML indent level in which formatting is switched to inline
public setInlineLevel ( integer $inline_level )
$inline_level integer

Property Details

$indent_spaces protected property

protected int $indent_spaces
return integer

$inline_level protected property

protected int $inline_level
return integer

$main_buffer protected property

protected array $main_buffer
return array

$output_fn protected property

protected string $output_fn
return string

$sub_buffers protected property

protected array $sub_buffers
return array