PHP Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

generate() публичный статический Метод

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

propertiesSetAndMatch() публичный статический Метод

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