@@ -7,27 +7,27 @@ |
||
7 | 7 | class MysqlPostRepository implements PostRepository |
8 | 8 | { |
9 | 9 | |
10 | - protected $connections; |
|
10 | + protected $connections; |
|
11 | 11 | |
12 | - public function __construct(ConnectionLocator $connections) |
|
13 | - { |
|
14 | - $this->connections = $connections; |
|
15 | - } |
|
12 | + public function __construct(ConnectionLocator $connections) |
|
13 | + { |
|
14 | + $this->connections = $connections; |
|
15 | + } |
|
16 | 16 | |
17 | - // todo make this smarter - it should parse by category as well |
|
18 | - public function findByUri($uri) |
|
19 | - { |
|
20 | - $query = " |
|
17 | + // todo make this smarter - it should parse by category as well |
|
18 | + public function findByUri($uri) |
|
19 | + { |
|
20 | + $query = " |
|
21 | 21 | SELECT `id`, `title`, `path`, `date`, `body`, `category` |
22 | 22 | FROM `jpemeric_blog`.`post` |
23 | 23 | WHERE `path` = :uri AND `display` = '1' |
24 | 24 | LIMIT 1"; |
25 | - $bindings = array( |
|
26 | - 'uri' => $uri |
|
27 | - ); |
|
28 | - return $this |
|
29 | - ->connections |
|
30 | - ->getRead() |
|
31 | - ->fetchOne($query, $bindings); |
|
32 | - } |
|
25 | + $bindings = array( |
|
26 | + 'uri' => $uri |
|
27 | + ); |
|
28 | + return $this |
|
29 | + ->connections |
|
30 | + ->getRead() |
|
31 | + ->fetchOne($query, $bindings); |
|
32 | + } |
|
33 | 33 | } |