PHP Class ComponentStubGenerator

Yii components' properties can come from many sources and be accessed either directly or via get method calls. This class, given a set of property values, will generate a stub that will return those values under any circumstances.
Mostrar archivo Open project: openeyes/openeyes Class Usage Examples

Public Methods

Method Description
generate ( string $class_name, array $properties = [] )
propertiesSetAndMatch ( $stub, array $properties = [], boolean $force = false ) iteratest through properties to set values on the stub that exists on the stub class. If $force is true, will set the value regardless of whether or not the property exists on the element.

Method Details

generate() public static method

public static generate ( string $class_name, array $properties = [] )
$class_name string
$properties array

propertiesSetAndMatch() public static method

iteratest through properties to set values on the stub that exists on the stub class. If $force is true, will set the value regardless of whether or not the property exists on the element.
public static propertiesSetAndMatch ( $stub, array $properties = [], boolean $force = false )
$stub
$properties array
$force boolean