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.
Afficher le fichier Open project: openeyes/openeyes Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

propertiesSetAndMatch() public static méthode

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