Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (49 sloc) 1.42 KB
{% filter noblanklines %}
class {{ model.className }} extends apiModel
{{% indent %}
{% for property in model.properties %}
{% if property.typeHint %}
protected $__{{ property.codeName }}Type = '{{ property.typeHint|cut:" " }}';
protected $__{{ property.codeName }}DataType = '{{ property.dataType }}';
{% endif %}
public ${{ property.codeName }};
{% endfor %}
{% for property in model.properties %}
{% ifequal property.type "array" %}
/**
* Set {{ property.codeType }} values
*
* @param array ${{ property.codeName }} {{ property.codeType }}
*
* @return void
*/
public function set{{ property.codeName|capfirst }}(${{ property.codeName }})
{
{% indent %}$this->assertIsArray(${{ property.codeName }}, {{ property.codeType }}, __METHOD__);
$this->{{ property.codeName }} = ${{ property.codeName }};{% endindent %}
}
{% else %}
/**
* Set {{ property.codeType }} value
*
* @param {{ property.codeType }} ${{ property.codeName }} {{ property.codeType }}
*
* @return void
*/
public function set{{ property.codeName|capfirst }}({{ property.typeHint }}${{ property.codeName }})
{
{% indent %}$this->{{ property.codeName }} = ${{ property.codeName }};{% endindent %}
}
{% endifequal %}
/**
* Get {{ property.codeType }} value
*
* @return {{ property.codeType }}
*/
public function get{{ property.codeName|capfirst }}()
{
{% indent %}return $this->{{ property.codeName }};{% endindent %}
}
{% endfor %}{% endindent %}
}
{% endfilter %}
Something went wrong with that request. Please try again.