Skip to content

Commit

Permalink
modify namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Mosaab4 committed Aug 27, 2021
1 parent 0b4cac8 commit 87b5f12
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Application.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

use App\Core\DB\Database;
use Mosaab\MVC\DB\Database;
use Exception;

class Application
Expand Down
4 changes: 2 additions & 2 deletions Controller.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

use App\Core\Middlewares\BaseMiddleware;
use Mosaab\MVC\Middlewares\BaseMiddleware;

class Controller
{
Expand Down
4 changes: 2 additions & 2 deletions DB/Database.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core\DB;
namespace Mosaab\MVC\DB;

use App\Core\Application;
use Mosaab\MVC\Application;
use PDO;

class Database
Expand Down
6 changes: 3 additions & 3 deletions DB/DbModel.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace App\Core\DB;
namespace Mosaab\MVC\DB;

use App\Core\Application;
use App\Core\Model;
use Mosaab\MVC\Application;
use Mosaab\MVC\Model;

abstract class DbModel extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion Exceptions/ForbiddenException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core\Exceptions;
namespace Mosaab\MVC\Exceptions;

class ForbiddenException extends \Exception
{
Expand Down
2 changes: 1 addition & 1 deletion Exceptions/NotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core\Exceptions;
namespace Mosaab\MVC\Exceptions;

class NotFoundException extends \Exception
{
Expand Down
4 changes: 2 additions & 2 deletions Form/BaseField.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core\Form;
namespace Mosaab\MVC\Form;

use App\Core\Model;
use Mosaab\MVC\Model;

abstract class BaseField
{
Expand Down
4 changes: 2 additions & 2 deletions Form/Form.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core\Form;
namespace Mosaab\MVC\Form;

use App\Core\Model;
use Mosaab\MVC\Model;

class Form
{
Expand Down
4 changes: 2 additions & 2 deletions Form/InputField.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core\Form;
namespace Mosaab\MVC\Form;

use App\Core\Model;
use Mosaab\MVC\Model;

class InputField extends BaseField
{
Expand Down
2 changes: 1 addition & 1 deletion Form/TextareaField.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core\Form;
namespace Mosaab\MVC\Form;

class TextareaField extends BaseField
{
Expand Down
6 changes: 3 additions & 3 deletions Middlewares/AuthMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace App\Core\Middlewares;
namespace Mosaab\MVC\Middlewares;

use App\Core\Application;
use App\Core\Exceptions\ForbiddenException;
use Mosaab\MVC\Application;
use Mosaab\MVC\Exceptions\ForbiddenException;

class AuthMiddleware extends BaseMiddleware
{
Expand Down
2 changes: 1 addition & 1 deletion Middlewares/BaseMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core\Middlewares;
namespace Mosaab\MVC\Middlewares;

abstract class BaseMiddleware
{
Expand Down
2 changes: 1 addition & 1 deletion Model.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

abstract class Model
{
Expand Down
2 changes: 1 addition & 1 deletion Request.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

class Request
{
Expand Down
2 changes: 1 addition & 1 deletion Response.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

class Response
{
Expand Down
4 changes: 2 additions & 2 deletions Router.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

use App\Core\Exceptions\NotFoundException;
use Mosaab\MVC\Exceptions\NotFoundException;

class Router
{
Expand Down
2 changes: 1 addition & 1 deletion Session.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

class Session
{
Expand Down
4 changes: 2 additions & 2 deletions UserModel.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

use App\Core\DB\DbModel;
use Mosaab\MVC\DB\DbModel;

abstract class UserModel extends DbModel
{
Expand Down
2 changes: 1 addition & 1 deletion View.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Core;
namespace Mosaab\MVC;

class View
{
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "mosaab/core",
"require": {}
"require": {},
"autoload": {
"ps-4": {
"Mosaab\\MVC\\" : "."
}
}
}

0 comments on commit 87b5f12

Please sign in to comment.