You are currently viewing the 0.10 branch api documentation. Switch to 1.0 or 1.1

0.10 Doctrine_Record_Generator

Doctrine Record Generator

Inheritence

Doctrine_Record_Generator  < Doctrine_Record_Abstract  < Doctrine_Access

Direct Sub-Classes

Method Summary

Returns Name Description
addChild Add child record generator
buildChildDefinitions
array buildForeignKeys generates foreign keys for the plugin table based on the owner table the foreign keys generated by this method can be used for setting the relations between the owner and the plugin classes
buildForeignRelation
buildLocalRelation
buildRelation this method can be used for generating the relation from the plugin table to the owner table. By default buildForeignRelation() and buildLocalRelation() are called Those methods can be overridden or this entire method can be overridden
buildTable
generateClass generates the class definition for plugin class
mixed getOption
array getOptions returns all options and their associated values
initialize Initialize the plugin. Call in Doctrine_Template setTableDefinition() in order to initiate a generator in a template SEE: Doctrine_Template_I18n for an example
initOptions
Doctrine_Plugin setOption
__get
__isset

Method Details

  • addChild(( ) $generator)

    Add child record generator


  • buildChildDefinitions()


  • $table the table object that owns the plugin

    (array) buildForeignKeys(( ) $table)

    generates foreign keys for the plugin table based on the owner table
    the foreign keys generated by this method can be used for setting the relations between the owner and the plugin classes

    Doctrine_Record_Generator


  • $alias Alias of the foreign relation

    buildForeignRelation($alias = null)


  • buildLocalRelation()


  • buildRelation()

    this method can be used for generating the relation from the plugin table to the owner table. By default buildForeignRelation() and buildLocalRelation() are called Those methods can be overridden or this entire method can be overridden


  • buildTable()


  • $columns the plugin class columns, keys representing the column names and values as column definitions
    $relations the bound relations of the plugin class
    $options plugin class options, keys representing the option names and values as option values

    generateClass($definition = array(), $columns, $relations, $options)

    generates the class definition for plugin class


  • $name the name of the option to retrieve

    (mixed) getOption(($option) $name)

    returns the value of an option

    Doctrine_Record_Generator


  • (array) getOptions()

    returns all options and their associated values

    Doctrine_Record_Generator


  • initialize(( ) $table)

    Initialize the plugin. Call in Doctrine_Template setTableDefinition() in order to initiate a generator in a template SEE: Doctrine_Template_I18n for an example


  • initOptions()

    empty template method for providing the concrete plugins the ability to initialize options before the actual definition is being built


  • $name the name of the option to be changed
    $value the value of the option

    (Doctrine_Plugin) setOption(($option) $name, ($value) $value)

    sets given value to an option

    Doctrine_Record_Generator


  • __get($option)

    __get an alias for getOption


  • __isset($option)