PHP Class Gregwar\Formidable\Factory

Author: GrĂ©goire Passault ([email protected])
Inheritance: extends Gregwar\Formidable\Language\LanguageAware
Show file Open project: gregwar/formidable Class Usage Examples

Protected Properties

Property Type Description
$formClass Form clas
$parserClass Parser class
$typeClasses Field types

Public Methods

Method Description
__construct ( ) Constructs the factory
getField ( $name ) Get a field of a given type
getForm ( $pathOrContent, array $vars = [], $cache = false ) Get a form in this factory
getObject ( $name ) Get an object
getParser ( $content, $offset ) Get a parser
registerType ( $type, $class ) Register a type

Protected Methods

Method Description
inject ( $object )

Method Details

__construct() public method

Constructs the factory
public __construct ( )

getField() public method

Get a field of a given type
public getField ( $name )

getForm() public method

Get a form in this factory
public getForm ( $pathOrContent, array $vars = [], $cache = false )
$vars array

getObject() public method

Get an object
public getObject ( $name )

getParser() public method

Get a parser
public getParser ( $content, $offset )

inject() protected method

protected inject ( $object )

registerType() public method

Register a type
public registerType ( $type, $class )

Property Details

$formClass protected property

Form clas
protected $formClass

$parserClass protected property

Parser class
protected $parserClass

$typeClasses protected property

Field types
protected $typeClasses