18 lines
317 B
PHP
18 lines
317 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Kernel\Object;
|
|
|
|
trait HasHiddenAttributes
|
|
{
|
|
public function isHidden(string $key): bool
|
|
{
|
|
if (property_exists($this, 'hidden') && is_array($this->hidden)) {
|
|
return in_array($key, $this->hidden, true);
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|