- Some overdue modification made to allow more flexibility
This commit is contained in:
1 parent
cc741566fb
commit
1927b43999
14 files changed
+88
-51
No files matched your search
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Ulmus\Attribute\Obj;
|
||||
|
||||
interface AdapterAttributeInterface
|
||||
{
|
||||
public function adapter() : false|string;
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Ulmus\Attribute\Obj;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_CLASS)]
|
||||
class Table {
|
||||
class Table implements AdapterAttributeInterface {
|
||||
public function __construct(
|
||||
public ? string $name = null,
|
||||
public ? string $database = null,
|
||||
@@ -11,4 +11,9 @@ class Table {
|
||||
public ? string $adapter = null,
|
||||
public ? string $engine = null,
|
||||
) {}
|
||||
|
||||
public function adapter() : false|string
|
||||
{
|
||||
return $this->adapter ?: false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user