名前空間の参照ちょっと修正
This commit is contained in:
+4
-4
@@ -8,8 +8,8 @@ Response
|
|||||||
{
|
{
|
||||||
public static function
|
public static function
|
||||||
fetch_all (
|
fetch_all (
|
||||||
SQLite3 $db,
|
\SQLite3 $db,
|
||||||
int $thread_id)
|
int $thread_id)
|
||||||
: array
|
: array
|
||||||
{
|
{
|
||||||
$sql = "
|
$sql = "
|
||||||
@@ -59,7 +59,7 @@ Response
|
|||||||
|
|
||||||
public static function
|
public static function
|
||||||
like (
|
like (
|
||||||
SQLite3 $db,
|
\SQLite3 $db,
|
||||||
int $thread_id,
|
int $thread_id,
|
||||||
int $response_id)
|
int $response_id)
|
||||||
: void
|
: void
|
||||||
@@ -79,7 +79,7 @@ Response
|
|||||||
|
|
||||||
public static function
|
public static function
|
||||||
dislike (
|
dislike (
|
||||||
SQLite3 $db,
|
\SQLite3 $db,
|
||||||
int $thread_id,
|
int $thread_id,
|
||||||
int $response_id)
|
int $response_id)
|
||||||
: void
|
: void
|
||||||
|
|||||||
+11
-7
@@ -8,7 +8,7 @@ Thread
|
|||||||
{
|
{
|
||||||
public static function
|
public static function
|
||||||
fetch_all (
|
fetch_all (
|
||||||
SQLite3 $db)
|
\SQLite3 $db)
|
||||||
: array
|
: array
|
||||||
{
|
{
|
||||||
$sql = "
|
$sql = "
|
||||||
@@ -53,8 +53,8 @@ Thread
|
|||||||
|
|
||||||
public static function
|
public static function
|
||||||
find (
|
find (
|
||||||
SQLite3 $db,
|
\SQLite3 $db,
|
||||||
int $id)
|
int $id)
|
||||||
: ?\Dto\Thread
|
: ?\Dto\Thread
|
||||||
{
|
{
|
||||||
$sql = "
|
$sql = "
|
||||||
@@ -77,6 +77,10 @@ Thread
|
|||||||
latest DESC";
|
latest DESC";
|
||||||
|
|
||||||
$result = $db -> query ($sql);
|
$result = $db -> query ($sql);
|
||||||
|
|
||||||
|
if ($row === false)
|
||||||
|
return null;
|
||||||
|
|
||||||
$row = $result -> fetchArray (SQLITE3_ASSOC);
|
$row = $result -> fetchArray (SQLITE3_ASSOC);
|
||||||
|
|
||||||
if ($row === false)
|
if ($row === false)
|
||||||
@@ -95,9 +99,9 @@ Thread
|
|||||||
|
|
||||||
public static function
|
public static function
|
||||||
create_thread (
|
create_thread (
|
||||||
SQLite3 $db,
|
\SQLite3 $db,
|
||||||
string $title,
|
string $title,
|
||||||
string $explain)
|
string $explain)
|
||||||
: void
|
: void
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
@@ -106,7 +110,7 @@ Thread
|
|||||||
|
|
||||||
public static function
|
public static function
|
||||||
delete_thread (
|
delete_thread (
|
||||||
SQLite3 $db,
|
\SQLite3 $db,
|
||||||
int $id)
|
int $id)
|
||||||
: void
|
: void
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user