diff options
Diffstat (limited to 'core/namespace/User')
-rw-r--r-- | core/namespace/User/Attribute.php | 24 | ||||
-rw-r--r-- | core/namespace/User/Entity.php | 15 | ||||
-rw-r--r-- | core/namespace/User/Exception.php | 4 | ||||
-rw-r--r-- | core/namespace/User/Factory.php | 8 | ||||
-rw-r--r-- | core/namespace/User/Item.php | 6 | ||||
-rw-r--r-- | core/namespace/User/Repository.php | 7 |
6 files changed, 22 insertions, 42 deletions
diff --git a/core/namespace/User/Attribute.php b/core/namespace/User/Attribute.php deleted file mode 100644 index ccd31b5..0000000 --- a/core/namespace/User/Attribute.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -namespace User; - -class Attribute extends \Attribute { - - #=============================================================================== - # Pre-Define database table columns - #=============================================================================== - protected $id = FALSE; - protected $slug = FALSE; - protected $username = FALSE; - protected $password = FALSE; - protected $fullname = FALSE; - protected $mailaddr = FALSE; - protected $body = FALSE; - protected $argv = FALSE; - protected $time_insert = FALSE; - protected $time_update = FALSE; - - #=============================================================================== - # Define database table name - #=============================================================================== - const TABLE = 'user'; -} diff --git a/core/namespace/User/Entity.php b/core/namespace/User/Entity.php new file mode 100644 index 0000000..fdfaf9e --- /dev/null +++ b/core/namespace/User/Entity.php @@ -0,0 +1,15 @@ +<?php +namespace User; + +class Entity extends \Entity { + protected $id = FALSE; + protected $slug = FALSE; + protected $username = FALSE; + protected $password = FALSE; + protected $fullname = FALSE; + protected $mailaddr = FALSE; + protected $body = FALSE; + protected $argv = FALSE; + protected $time_insert = FALSE; + protected $time_update = FALSE; +} diff --git a/core/namespace/User/Exception.php b/core/namespace/User/Exception.php deleted file mode 100644 index fdbe733..0000000 --- a/core/namespace/User/Exception.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php -namespace User; - -class Exception extends \Exception {} diff --git a/core/namespace/User/Factory.php b/core/namespace/User/Factory.php deleted file mode 100644 index 81930e6..0000000 --- a/core/namespace/User/Factory.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -namespace User; - -class Factory extends \ItemFactory { - public static function buildByUsername($username): \Item { - return self::build(Item::getIDByField('username', $username, \Application::getDatabase())); - } -} diff --git a/core/namespace/User/Item.php b/core/namespace/User/Item.php deleted file mode 100644 index 5039287..0000000 --- a/core/namespace/User/Item.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -namespace User; - -class Item extends \Item { - const CONFIGURATION = 'USER'; -} diff --git a/core/namespace/User/Repository.php b/core/namespace/User/Repository.php new file mode 100644 index 0000000..59205b3 --- /dev/null +++ b/core/namespace/User/Repository.php @@ -0,0 +1,7 @@ +<?php +namespace User; + +class Repository extends \Repository { + public static function getTableName(): string { return 'user'; } + public static function getClassName(): string { return 'User\Entity'; } +} |