Iber\Generator\Utilities\SetGetGenerator::generateWithFunction PHP Method

generateWithFunction() protected method

Loops the attributes and build the string with given function name
protected generateWithFunction ( string $function ) : string
$function string
return string
    protected function generateWithFunction($function)
    {
        $string = "";
        foreach ($this->attributes as $attributeName) {
            $string .= $this->{$function}($attributeName);
        }
        return $string;
    }