-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
20 changed files
with
57 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = []; | ||
|
||
|
@@ -40,7 +40,7 @@ public function registerMiddleware(BaseMiddleware $middleware) | |
} | ||
|
||
/** | ||
* @return \app\core\middlewares\BaseMiddleware[] | ||
* @return \thecodeholic\phpmvc\middlewares\BaseMiddleware[] | ||
*/ | ||
public function getMiddlewares(): array | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Time: 10:23 AM | ||
*/ | ||
|
||
namespace app\core; | ||
namespace thecodeholic\phpmvc; | ||
|
||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,10 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"require": {} | ||
"require": {}, | ||
"autoload": { | ||
"psr-4": { | ||
"thecodeholic\\phpmvc\\": "." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
@@ -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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|