Skip to content

Commit

Permalink
[ENH] refactoring entity structure into ORM module
Browse files Browse the repository at this point in the history
  • Loading branch information
bim-g committed Aug 30, 2023
1 parent b84d057 commit fca6868
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions controller/homeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Wepesi\Core\Redirect;
use Wepesi\Core\Session;


class homeController{

/**
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Wepesi\Core\BaseEntityModel;
namespace Wepesi\Core\Orm\EntityModel;

use Wepesi\Core\BaseEntityModel\Provider\Contract\EntityInterface;
use Wepesi\Core\Orm\EntityModel\Provider\Contract\EntityInterface;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
namespace Wepesi\Core\Orm\EntityModel\Provider\Contract;

interface EntityInterface {
public function findAll():array;
public function findOne():array;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php

namespace Wepesi\Core\BaseEntityModel\Provider;
namespace Wepesi\Core\Orm\EntityModel\Provider;

use phpDocumentor\Reflection\Types\This;
use Wepesi\Core\BaseEntityModel\EntityReflexion;
use Wepesi\Core\BaseEntityModel\Provider\Contract\EntityInterface;
use Wepesi\Core\Orm\EntityModel\EntityReflexion;
use Wepesi\Core\Orm\EntityModel\Provider\Contract\EntityInterface;
use Wepesi\Core\Orm\DB;
use Wepesi\Core\Orm\Relations\HasMany;
use Wepesi\Core\Orm\Relations\HasOne;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Orm/Relations/BaseRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Wepesi\Core\Orm\Relations;

use Wepesi\Core\BaseEntityModel\EntityReflexion;
use Wepesi\Core\BaseEntityModel\Provider\Contract\EntityInterface;
use Wepesi\Core\Orm\EntityModel\EntityReflexion;
use Wepesi\Core\Orm\EntityModel\Provider\Contract\EntityInterface;
/**
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Orm/Relations/HasMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wepesi\Core\Orm\Relations;

use Wepesi\Core\BaseEntityModel\Provider\Contract\EntityInterface;
use Wepesi\Core\Orm\EntityModel\Provider\Contract\EntityInterface;


/**
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Orm/Relations/HasOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wepesi\Core\Orm\Relations;

use Wepesi\Core\BaseEntityModel\Provider\Contract\EntityInterface;
use Wepesi\Core\Orm\EntityModel\Provider\Contract\EntityInterface;

/**
*
Expand Down

0 comments on commit fca6868

Please sign in to comment.