Свойство | Type | Description | |
---|---|---|---|
$attributes | array | Lists of attributes to convert | |
$getStub | string | Returns a template stub for get function | |
$setStub | string | Returns a template stub for set function |
Méthode | Description | |
---|---|---|
__construct ( array $attributes, string $getStub, string $setStub ) | [__construct description] | |
attributeNameToFunction ( string $prefixFunction, string $str, array $noStrip = [] ) : string | Converts the given string to function. Support database names (underscores) | |
createGetFunctionFromAttributeName ( string $attributeName ) : string | Bulds the get function for the attribute name | |
createSetFunctionFromAttributeName ( string $attributeName ) : string | Bulds the set function for the attribute name | |
generateGetFunctions ( ) : string | Returns the get functions in string | |
generateSetFunctions ( ) : string | Returns the set functions in string |
Méthode | Description | |
---|---|---|
createAttributeFunction ( string $stubTemplate, string $function, string $attributeName ) : string | Replaces the stub template with the data | |
createFunctionFromAttributeName ( string $prefixFunction, string $attributeName, string $stubTemplate ) : string | Builds the funciton and creates the function from the stub template | |
generateWithFunction ( string $function ) : string | Loops the attributes and build the string with given function name |
public createGetFunctionFromAttributeName ( string $attributeName ) : string | ||
$attributeName | string | |
Résultat | string |
public createSetFunctionFromAttributeName ( string $attributeName ) : string | ||
$attributeName | string | |
Résultat | string |
public generateGetFunctions ( ) : string | ||
Résultat | string |
public generateSetFunctions ( ) : string | ||
Résultat | string |
protected generateWithFunction ( string $function ) : string | ||
$function | string | |
Résultat | string |
protected array $attributes | ||
Résultat | array |
protected string $getStub | ||
Résultat | string |
protected string $setStub | ||
Résultat | string |