- Some overdue modification made to allow more flexibility

This commit is contained in:
mcndave committed 2023-10-27 17:53:55 +00:00
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;
}
+6 -1
View File
@@ -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;
}
}