public attributes ( ) : array | ||
return | array | list of attribute names. |
public function attributes()
{
$class = new \ReflectionClass($this);
$names = [];
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
if (!$property->isStatic()) {
$names[] = $property->getName();
}
}
return ArrayHelper::merge(parent::attributes(), $names);
}