- WIP on attributes ; on testing phase
This commit is contained in:
1 parent
5295a335b3
commit
e6d0279c1a
44 files changed
+763
-142
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Ulmus\Attribute;
|
||||
|
||||
use Ulmus\Common\EntityField;
|
||||
|
||||
class Attribute
|
||||
{
|
||||
public static function handleArrayField(null|\Stringable|string|array $field) : mixed
|
||||
{
|
||||
if ( is_array($field) ) {
|
||||
$class = array_shift($field);
|
||||
|
||||
return $class::field(...$field);
|
||||
}
|
||||
|
||||
return $field;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user