Skip to content

Commit

Permalink
Adds more levels to the domain namespacing
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobemerick committed Dec 2, 2015
1 parent 34318de commit 75f992a
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 31 deletions.
2 changes: 2 additions & 0 deletions images/photo/.gitignore
@@ -0,0 +1,2 @@
*
!.gitignore
@@ -0,0 +1,8 @@
<?php

namespace Jacobemerick\Web\Domain\Blog\Introduction;

interface IntroductionRepositoryInterface
{
public function findByType($type, $value = '');
}
@@ -1,10 +1,10 @@
<?php

namespace Jacobemerick\Web\Domain\Blog;
namespace Jacobemerick\Web\Domain\Blog\Introduction;

use Aura\Sql\ConnectionLocator;

class MysqlIntroductionRepository implements IntroductionRepository
class MysqlIntroductionRepository implements IntroductionRepositoryInterface
{

/** @var Aura\Sql\ConnectionLocator */
Expand Down
8 changes: 0 additions & 8 deletions src/Domain/Blog/IntroductionRepository.php

This file was deleted.

@@ -1,10 +1,10 @@
<?php

namespace Jacobemerick\Web\Domain\Blog;
namespace Jacobemerick\Web\Domain\Blog\Post;

use Aura\Sql\ConnectionLocator;

class MysqlPostRepository implements PostRepository
class MysqlPostRepository implements PostRepositoryInterface
{

/** @var Aura\Sql\ConnectionLocator */
Expand Down
@@ -1,8 +1,8 @@
<?php

namespace Jacobemerick\Web\Domain\Blog;
namespace Jacobemerick\Web\Domain\Blog\Post;

interface PostRepository
interface PostRepositoryInterface
{
public function findPostByPath($category, $path);
public function getActivePosts($limit = null, $offset= 0);
Expand Down
@@ -1,10 +1,10 @@
<?php

namespace Jacobemerick\Web\Domain\Blog;
namespace Jacobemerick\Web\Domain\Blog\Series;

use Aura\Sql\ConnectionLocator;

class MysqlSeriesRepository implements SeriesRepository
class MysqlSeriesRepository implements SeriesRepositoryInterface
{

/** @var Aura\Sql\ConnectionLocator */
Expand Down
8 changes: 8 additions & 0 deletions src/Domain/Blog/Series/SeriesRepositoryInterface.php
@@ -0,0 +1,8 @@
<?php

namespace Jacobemerick\Web\Domain\Blog\Series;

interface SeriesRepositoryInterface
{
public function getSeriesForPost($post);
}
8 changes: 0 additions & 8 deletions src/Domain/Blog/SeriesRepository.php

This file was deleted.

@@ -1,10 +1,10 @@
<?php

namespace Jacobemerick\Web\Domain\Blog;
namespace Jacobemerick\Web\Domain\Blog\Tag;

use Aura\Sql\ConnectionLocator;

class MysqlTagRepository implements TagRepository
class MysqlTagRepository implements TagRepositoryInterface
{

/** @var Aura\Sql\ConnectionLocator */
Expand Down
@@ -1,8 +1,8 @@
<?php

namespace Jacobemerick\Web\Domain\Blog;
namespace Jacobemerick\Web\Domain\Blog\Tag;

interface TagRepository
interface TagRepositoryInterface
{
public function findTagByTitle($title);
public function getAllTags();
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/domain/blog/MysqlPostRepositoryTest.php
Expand Up @@ -2,9 +2,9 @@

use Aura\Sql\ConnectionLocator;
use Aura\Sql\ExtendedPdo;
use Jacobemerick\Web\Domain\Blog\MysqlPostRepository;
use Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository;

class MysqlPostRepositoryTest extends \PHPUnit_Framework_TestCase
class MysqlPostRepositoryTest extends PHPUnit_Framework_TestCase
{

protected $connections;
Expand Down Expand Up @@ -105,7 +105,7 @@ public function testFindPostByPath()
public function testIsInstanceOfPostRepository()
{
$this->assertInstanceOf(
'Jacobemerick\Web\Domain\Blog\PostRepository',
'Jacobemerick\Web\Domain\Blog\Post\PostRepositoryInterface',
$this->newMysqlPostRepository()
);
}
Expand Down

0 comments on commit 75f992a

Please sign in to comment.