Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodeholic committed Jul 26, 2020
2 parents dba81db + e337cd1 commit 75c27ce
Show file tree
Hide file tree
Showing 20 changed files with 57 additions and 52 deletions.
4 changes: 2 additions & 2 deletions Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Time: 9:57 AM
*/

namespace app\core;
namespace thecodeholic\phpmvc;

use app\core\db\Database;
use thecodeholic\phpmvc\db\Database;

/**
* Class Application
Expand Down
10 changes: 5 additions & 5 deletions Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
* Time: 8:43 AM
*/

namespace app\core;
namespace thecodeholic\phpmvc;

use app\core\middlewares\BaseMiddleware;
use thecodeholic\phpmvc\middlewares\BaseMiddleware;
/**
* Class Controller
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
class Controller
{
public string $layout = 'main';
public string $action = '';

/**
* @var \app\core\BaseMiddleware[]
* @var \thecodeholic\phpmvc\BaseMiddleware[]
*/
protected array $middlewares = [];

Expand All @@ -40,7 +40,7 @@ public function registerMiddleware(BaseMiddleware $middleware)
}

/**
* @return \app\core\middlewares\BaseMiddleware[]
* @return \thecodeholic\phpmvc\middlewares\BaseMiddleware[]
*/
public function getMiddlewares(): array
{
Expand Down
4 changes: 2 additions & 2 deletions Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Time: 9:16 AM
*/

namespace app\core;
namespace thecodeholic\phpmvc;


/**
* Class Model
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
class Model
{
Expand Down
2 changes: 1 addition & 1 deletion Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Time: 10:23 AM
*/

namespace app\core;
namespace thecodeholic\phpmvc;


/**
Expand Down
4 changes: 2 additions & 2 deletions Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Time: 10:53 AM
*/

namespace app\core;
namespace thecodeholic\phpmvc;


/**
* Class Response
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
class Response
{
Expand Down
6 changes: 3 additions & 3 deletions Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Time: 10:01 AM
*/

namespace app\core;
namespace thecodeholic\phpmvc;

use app\core\exception\NotFoundException;
use thecodeholic\phpmvc\exception\NotFoundException;

/**
* Class Router
Expand Down Expand Up @@ -50,7 +50,7 @@ public function resolve()
}
if (is_array($callback)) {
/**
* @var $controller \app\core\Controller
* @var $controller \thecodeholic\phpmvc\Controller
*/
$controller = new $callback[0];
$controller->action = $callback[1];
Expand Down
4 changes: 2 additions & 2 deletions Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Time: 11:18 PM
*/

namespace app\core;
namespace thecodeholic\phpmvc;


/**
* Class Session
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
class Session
{
Expand Down
6 changes: 3 additions & 3 deletions UserModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Time: 10:13 AM
*/

namespace app\core;
namespace thecodeholic\phpmvc;

use app\core\db\DbModel;
use thecodeholic\phpmvc\db\DbModel;

/**
* Class UserModel
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
abstract class UserModel extends DbModel
{
Expand Down
4 changes: 2 additions & 2 deletions View.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Time: 2:45 PM
*/

namespace app\core;
namespace thecodeholic\phpmvc;


/**
* Class View
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
class View
{
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"email": "[email protected]"
}
],
"require": {}
"require": {},
"autoload": {
"psr-4": {
"thecodeholic\\phpmvc\\": "."
}
}
}
6 changes: 3 additions & 3 deletions db/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* Time: 8:09 AM
*/

namespace app\core\db;
namespace thecodeholic\phpmvc\db;


use app\core\Application;
use thecodeholic\phpmvc\Application;

/**
* Class Database
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
class Database
{
Expand Down
8 changes: 4 additions & 4 deletions db/DbModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* Time: 9:19 AM
*/

namespace app\core\db;
namespace thecodeholic\phpmvc\db;

use app\core\Application;
use app\core\Model;
use thecodeholic\phpmvc\Application;
use thecodeholic\phpmvc\Model;

/**
* Class DbModel
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
abstract class DbModel extends Model
{
Expand Down
6 changes: 3 additions & 3 deletions exception/ForbiddenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* Time: 11:35 AM
*/

namespace app\core\exception;
namespace thecodeholic\phpmvc\exception;


use app\core\Application;
use thecodeholic\phpmvc\Application;

/**
* Class ForbiddenException
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core\exception
* @package thecodeholic\phpmvc\exception
*/
class ForbiddenException extends \Exception
{
Expand Down
4 changes: 2 additions & 2 deletions exception/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Time: 11:43 AM
*/

namespace app\core\exception;
namespace thecodeholic\phpmvc\exception;


/**
* Class NotFoundException
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core\exception
* @package thecodeholic\phpmvc\exception
*/
class NotFoundException extends \Exception
{
Expand Down
8 changes: 4 additions & 4 deletions form/BaseField.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* Time: 3:49 PM
*/

namespace app\core\form;
namespace thecodeholic\phpmvc\form;


use app\core\Model;
use thecodeholic\phpmvc\Model;

/**
* Class BaseField
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core\form
* @package thecodeholic\phpmvc\form
*/
abstract class BaseField
{
Expand All @@ -26,7 +26,7 @@ abstract class BaseField
/**
* Field constructor.
*
* @param \app\core\Model $model
* @param \thecodeholic\phpmvc\Model $model
* @param string $attribute
*/
public function __construct(Model $model, string $attribute)
Expand Down
6 changes: 3 additions & 3 deletions form/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* Time: 7:05 AM
*/

namespace app\core\form;
namespace thecodeholic\phpmvc\form;


use app\core\Model;
use thecodeholic\phpmvc\Model;

/**
* Class Field
Expand All @@ -25,7 +25,7 @@ class Field extends BaseField
/**
* Field constructor.
*
* @param \app\core\Model $model
* @param \thecodeholic\phpmvc\Model $model
* @param string $attribute
*/
public function __construct(Model $model, string $attribute)
Expand Down
4 changes: 2 additions & 2 deletions form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* Time: 7:05 AM
*/

namespace app\core\form;
namespace thecodeholic\phpmvc\form;


use app\core\Model;
use thecodeholic\phpmvc\Model;

/**
* Class Form
Expand Down
4 changes: 2 additions & 2 deletions form/TextareaField.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Time: 3:49 PM
*/

namespace app\core\form;
namespace thecodeholic\phpmvc\form;


/**
* Class TextareaField
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core\form
* @package thecodeholic\phpmvc\form
*/
class TextareaField extends BaseField
{
Expand Down
8 changes: 4 additions & 4 deletions middlewares/AuthMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
* Time: 11:33 AM
*/

namespace app\core\middlewares;
namespace thecodeholic\phpmvc\middlewares;


use app\core\Application;
use app\core\exception\ForbiddenException;
use thecodeholic\phpmvc\Application;
use thecodeholic\phpmvc\exception\ForbiddenException;

/**
* Class AuthMiddleware
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
class AuthMiddleware extends BaseMiddleware
{
Expand Down
4 changes: 2 additions & 2 deletions middlewares/BaseMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Time: 11:33 AM
*/

namespace app\core\middlewares;
namespace thecodeholic\phpmvc\middlewares;


/**
* Class BaseMiddleware
*
* @author Zura Sekhniashvili <[email protected]>
* @package app\core
* @package thecodeholic\phpmvc
*/
abstract class BaseMiddleware
{
Expand Down

0 comments on commit 75c27ce

Please sign in to comment.