* Returns the list of attribute names. * By default, this method returns all public non-static properties of the class. * You may override this method to change the default behavior. * @return array list of attribute names. */
()
| 265 | * @return array list of attribute names. |
| 266 | */ |
| 267 | public function attributes() |
| 268 | { |
| 269 | $class = new ReflectionClass($this); |
| 270 | $names = []; |
| 271 | foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { |
| 272 | if (!$property->isStatic()) { |
| 273 | $names[] = $property->getName(); |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | return $names; |
| 278 | } |
| 279 | |
| 280 | /** |
| 281 | * Returns the attribute labels. |
no test coverage detected