aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/Post
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-25 22:13:59 +0200
committerThomas Lange <code@nerdmind.de>2021-06-25 22:13:59 +0200
commita86bdc6b5bab78b4026f44161413f4e482df42e4 (patch)
tree76ffd745780671371272e97b3eeac85e154e236e /core/namespace/Post
parent366d0de19c012821ef587d5fdb9557c339b43303 (diff)
downloadblog-a86bdc6b5bab78b4026f44161413f4e482df42e4.tar.gz
blog-a86bdc6b5bab78b4026f44161413f4e482df42e4.tar.xz
blog-a86bdc6b5bab78b4026f44161413f4e482df42e4.zip
Reorganize namespaces
Diffstat (limited to 'core/namespace/Post')
-rw-r--r--core/namespace/Post/Entity.php13
-rw-r--r--core/namespace/Post/Repository.php17
2 files changed, 0 insertions, 30 deletions
diff --git a/core/namespace/Post/Entity.php b/core/namespace/Post/Entity.php
deleted file mode 100644
index 399f5bb..0000000
--- a/core/namespace/Post/Entity.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-namespace Post;
-
-class Entity extends \Entity {
- protected $id = FALSE;
- protected $user = FALSE;
- protected $slug = FALSE;
- protected $name = FALSE;
- protected $body = FALSE;
- protected $argv = FALSE;
- protected $time_insert = FALSE;
- protected $time_update = FALSE;
-}
diff --git a/core/namespace/Post/Repository.php b/core/namespace/Post/Repository.php
deleted file mode 100644
index 5a3d834..0000000
--- a/core/namespace/Post/Repository.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-namespace Post;
-
-class Repository extends \Repository {
- public static function getTableName(): string { return 'post'; }
- public static function getClassName(): string { return 'Post\Entity'; }
-
- public function getCountByUser(\User\Entity $User): int {
- $query = 'SELECT COUNT(id) FROM %s WHERE user = ?';
- $query = sprintf($query, static::getTableName());
-
- $Statement = $this->Database->prepare($query);
- $Statement->execute([$User->getID()]);
-
- return $Statement->fetchColumn();
- }
-}