-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring app to create new project from scratch with the latest zemit
- Loading branch information
Showing
55 changed files
with
434 additions
and
301 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# force public folder | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteRule ^(.*)$ public/index.php?_url=/$1 [QSA,L] | ||
RewriteRule ^$ public/ [QSA,L] | ||
RewriteRule (.*) public/$1 [QSA,L] | ||
</IfModule> |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# deny access | ||
order deny,allow | ||
deny from all |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
namespace App\Config; | ||
|
||
use Zemit\Cli\Module as CliModule; | ||
use Zemit\Locale; | ||
use Zemit\Mvc\Module as MvcModule; | ||
use Zemit\Support\Env; | ||
|
||
class Config extends \Zemit\Bootstrap\Config | ||
{ | ||
public function __construct(array $data = [], bool $insensitive = false) | ||
{ | ||
$data = $this->internalMergeAppend([ | ||
|
||
'app' => [ | ||
'version' => '1.0.0' | ||
], | ||
|
||
'modules' => [ | ||
MvcModule::NAME_API => [ | ||
'className' => \App\Modules\Api\Module::class, | ||
'path' => APP_PATH . '/Modules/Api/Module.php', | ||
], | ||
MvcModule::NAME_ADMIN => [ | ||
'className' => \App\Modules\Admin\Module::class, | ||
'path' => APP_PATH . '/Modules/Admin/Module.php', | ||
], | ||
MvcModule::NAME_FRONTEND => [ | ||
'className' => \App\Modules\Frontend\Module::class, | ||
'path' => APP_PATH . '/Modules/Frontend/Module.php', | ||
], | ||
CliModule::NAME_CLI => [ | ||
'className' => \App\Modules\Cli\Module::class, | ||
'path' => APP_PATH . '/Modules/Cli/Module.php', | ||
], | ||
], | ||
|
||
'router' => [ | ||
'defaults' => [ | ||
'namespace' => Env::get('ROUTER_DEFAULT_NAMESPACE', 'App\\Modules\\Frontend\\Controllers'), | ||
'module' => Env::get('ROUTER_DEFAULT_MODULE', MvcModule::NAME_FRONTEND), | ||
], | ||
], | ||
|
||
'locale' => [ | ||
'default' => Env::get('LOCALE_DEFAULT', 'en'), | ||
'mode' => Env::get('LOCALE_MODE', Locale::MODE_DEFAULT), | ||
'allowed' => explode(',', Env::get('LOCALE_ALLOWED', 'en')), | ||
], | ||
|
||
'providers' => [ | ||
// add your providers here | ||
], | ||
|
||
'models' => [ | ||
// override native zemit models with your own | ||
], | ||
|
||
'permissions' => [ | ||
// add your application acl permissions here | ||
], | ||
], $data); | ||
} | ||
} |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace App\Modules\Admin\Controllers; | ||
|
||
use Zemit\Modules\Admin\Controller; | ||
|
||
abstract class AbstractController extends Controller | ||
{ | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace App\Modules\Admin\Controllers; | ||
|
||
use Zemit\Mvc\Controller\StatusCode; | ||
use Zemit\Mvc\Controller\Errors; | ||
|
||
class ErrorController extends AbstractController | ||
{ | ||
use StatusCode; | ||
use Errors; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace App\Modules\Admin\Controllers; | ||
|
||
class IndexController extends AbstractController | ||
{ | ||
public function indexAction() | ||
{ | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App\Modules\Admin; | ||
|
||
class Module extends \Zemit\Modules\Admin\Module | ||
{ | ||
final public function getNamespaces(): array | ||
{ | ||
return array_merge([ | ||
'App\\Models' => APP_PATH . '/Models/' | ||
], parent::getNamespaces()); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace App\Modules\Api\Controllers; | ||
|
||
use Zemit\Modules\Api\Controller; | ||
|
||
abstract class AbstractController extends Controller | ||
{ | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace App\Modules\Api\Controllers; | ||
|
||
use Zemit\Mvc\Controller\StatusCode; | ||
use Zemit\Mvc\Controller\Errors; | ||
|
||
class ErrorController extends AbstractController | ||
{ | ||
use StatusCode; | ||
use Errors; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace App\Modules\Api\Controllers; | ||
|
||
class IndexController extends AbstractController | ||
{ | ||
public function indexAction() | ||
{ | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App\Modules\Api; | ||
|
||
class Module extends \Zemit\Modules\Api\Module | ||
{ | ||
final public function getNamespaces(): array | ||
{ | ||
return array_merge([ | ||
'App\\Models' => APP_PATH . '/Models/' | ||
], parent::getNamespaces()); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App\Modules\Cli; | ||
|
||
class Module extends \Zemit\Modules\Cli\Module | ||
{ | ||
final public function getNamespaces(): array | ||
{ | ||
return array_merge([ | ||
'App\\Models' => APP_PATH . '/Models/', | ||
], parent::getNamespaces()); | ||
} | ||
} |
Oops, something went wrong.