Compare commits
2 commits
b1aa1608c3
...
28f9563251
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28f9563251 | ||
|
|
dcc518ede7 |
|
|
@ -2,9 +2,9 @@
|
||||||
namespace PHPSTORM_META
|
namespace PHPSTORM_META
|
||||||
{
|
{
|
||||||
|
|
||||||
use Musoka\Zap\Application;
|
use CrocWork\Zappy\Application;
|
||||||
|
|
||||||
override(Application::get(), map([
|
override(Application::get(), map([
|
||||||
'router' => Musoka\Zap\Routing\Router::class
|
'router' => CrocWork\Zappy\Routing\Router::class
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
39
README.md
39
README.md
|
|
@ -1 +1,38 @@
|
||||||
|
# Zappy PHP MicroFramework
|
||||||
|
|
||||||
|
This is the main repository for the Zappy MicroFramework. It contains the base
|
||||||
|
framework files needed to make it all work. Additional components are
|
||||||
|
available in separate repositories.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## How to use
|
||||||
|
|
||||||
|
The framework can be added to your project using composer. Currently this
|
||||||
|
project is not yet distributed on Packagist, so you will have to manually
|
||||||
|
add this repository to your composer.json file:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://forge.subcon.town/crocwork/zappy-base"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then install the framework with composer:
|
||||||
|
`composer require crocwork\zappy-base:dev-development`
|
||||||
|
|
||||||
|
**Keep in mind** that this software is still in very early stages of development:
|
||||||
|
it's not production ready and should not be used for production environments.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This software is licensed under the MIT License. Please view the included LICENSE
|
||||||
|
file for details.
|
||||||
|
|
||||||
|
## Collaboration
|
||||||
|
|
||||||
|
If you want to collaborate or need information, feel free to contact me on the
|
||||||
|
[fediverse](https://akkos.fritu.re/fristi). Pull requests are also welcome.
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "crocwork/zappy-base",
|
"name": "crocwork/zappy-base",
|
||||||
"description": "PHP microframework for Musoka projects.",
|
"description": "Zappy PHP MicroFramework for quick projects.",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
@ -8,13 +8,13 @@
|
||||||
"src/helpers.php"
|
"src/helpers.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Musoka\\Zap\\": "src/"
|
"CrocWork\\Zappy\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Fristi",
|
"name": "Fristi",
|
||||||
"email": "support@musoka.network"
|
"email": "fristi@subcon.town"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap;
|
namespace CrocWork\Zappy;
|
||||||
|
|
||||||
use Musoka\Zap\Components\ComponentAggregator;
|
use CrocWork\Zappy\Components\ComponentAggregator;
|
||||||
use Musoka\Zap\Components\ComponentProviderInterface;
|
use CrocWork\Zappy\Components\ComponentProviderInterface;
|
||||||
use Musoka\Zap\Config\ConfigRepository;
|
use CrocWork\Zappy\Config\ConfigRepository;
|
||||||
use Musoka\Zap\ErrorHandling\Handler;
|
use CrocWork\Zappy\ErrorHandling\Handler;
|
||||||
use Musoka\Zap\View\Renderable;
|
use CrocWork\Zappy\View\Renderable;
|
||||||
use Musoka\Zap\Http\Request;
|
use CrocWork\Zappy\Http\Request;
|
||||||
use Musoka\Zap\Http\Response;
|
use CrocWork\Zappy\Http\Response;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Components;
|
namespace CrocWork\Zappy\Components;
|
||||||
|
|
||||||
abstract class AbstractComponentProvider implements ComponentProviderInterface
|
abstract class AbstractComponentProvider implements ComponentProviderInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Components;
|
namespace CrocWork\Zappy\Components;
|
||||||
|
|
||||||
interface BootableProviderInterface extends ComponentProviderInterface
|
interface BootableProviderInterface extends ComponentProviderInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Components;
|
namespace CrocWork\Zappy\Components;
|
||||||
|
|
||||||
class ComponentAggregator
|
class ComponentAggregator
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Components;
|
namespace CrocWork\Zappy\Components;
|
||||||
|
|
||||||
interface ComponentProviderInterface
|
interface ComponentProviderInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Config;
|
namespace CrocWork\Zappy\Config;
|
||||||
|
|
||||||
class ConfigRepository
|
class ConfigRepository
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap;
|
namespace CrocWork\Zappy;
|
||||||
|
|
||||||
class DIContainer
|
class DIContainer
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\ErrorHandling;
|
namespace CrocWork\Zappy\ErrorHandling;
|
||||||
|
|
||||||
use Musoka\Zap\Application;
|
use CrocWork\Zappy\Application;
|
||||||
|
|
||||||
class Handler
|
class Handler
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
if(!function_exists('translator')) {
|
if(!function_exists('translator')) {
|
||||||
function translator(): \Musoka\Zap\I18n\Translator
|
function translator(): \CrocWork\Zappy\I18n\Translator
|
||||||
{
|
{
|
||||||
return app()->get('translator');
|
return app()->get('translator');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
if(!function_exists('view')) {
|
if(!function_exists('view')) {
|
||||||
function view(string $view, array $data = []): \Musoka\Zap\View\View
|
function view(string $view, array $data = []): \CrocWork\Zappy\View\View
|
||||||
{
|
{
|
||||||
$factory = app()->get('view');
|
$factory = app()->get('view');
|
||||||
if($factory) {
|
if($factory) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Http;
|
namespace CrocWork\Zappy\Http;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
|
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Http;
|
namespace CrocWork\Zappy\Http;
|
||||||
|
|
||||||
class Response extends \Symfony\Component\HttpFoundation\Response
|
class Response extends \Symfony\Component\HttpFoundation\Response
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\I18n;
|
namespace CrocWork\Zappy\I18n;
|
||||||
|
|
||||||
use Musoka\Zap\Components\AbstractComponentProvider;
|
use CrocWork\Zappy\Components\AbstractComponentProvider;
|
||||||
use Musoka\Zap\Components\ComponentAggregator;
|
use CrocWork\Zappy\Components\ComponentAggregator;
|
||||||
|
|
||||||
class I18nProvider extends AbstractComponentProvider
|
class I18nProvider extends AbstractComponentProvider
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\I18n;
|
namespace CrocWork\Zappy\I18n;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translator class
|
* Translator class
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
trait IsRepository
|
trait IsRepository
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
class LocalizedRepository extends Repository
|
class LocalizedRepository extends Repository
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
class LocalizedRoute extends Route
|
class LocalizedRoute extends Route
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
class Repository
|
class Repository
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
class Route
|
class Route
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
class RouteGroup
|
class RouteGroup
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
class RouteRepository
|
class RouteRepository
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
use Musoka\Zap\Application;
|
use CrocWork\Zappy\Application;
|
||||||
use Symfony\Component\HttpFoundation\HeaderBag;
|
use Symfony\Component\HttpFoundation\HeaderBag;
|
||||||
use Musoka\Zap\Http\Request;
|
use CrocWork\Zappy\Http\Request;
|
||||||
|
|
||||||
class Router implements RouterInterface
|
class Router implements RouterInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
interface RouterInterface
|
interface RouterInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
use Musoka\Zap\Components\AbstractComponentProvider;
|
use CrocWork\Zappy\Components\AbstractComponentProvider;
|
||||||
use Musoka\Zap\Components\ComponentAggregator;
|
use CrocWork\Zappy\Components\ComponentAggregator;
|
||||||
|
|
||||||
class RouterProvider extends AbstractComponentProvider
|
class RouterProvider extends AbstractComponentProvider
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\Routing;
|
namespace CrocWork\Zappy\Routing;
|
||||||
|
|
||||||
use Musoka\Zap\I18n\Translator;
|
use CrocWork\Zappy\I18n\Translator;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
class UrlGenerator
|
class UrlGenerator
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\View;
|
namespace CrocWork\Zappy\View;
|
||||||
|
|
||||||
interface Renderable
|
interface Renderable
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\View;
|
namespace CrocWork\Zappy\View;
|
||||||
|
|
||||||
enum SectionMode {
|
enum SectionMode {
|
||||||
case OVERWRITE;
|
case OVERWRITE;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\View;
|
namespace CrocWork\Zappy\View;
|
||||||
|
|
||||||
class ViewFactory
|
class ViewFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Musoka\Zap\View;
|
namespace CrocWork\Zappy\View;
|
||||||
|
|
||||||
use Musoka\Zap\Components\AbstractComponentProvider;
|
use CrocWork\Zappy\Components\AbstractComponentProvider;
|
||||||
use Musoka\Zap\Components\ComponentAggregator;
|
use CrocWork\Zappy\Components\ComponentAggregator;
|
||||||
|
|
||||||
class ViewProvider extends AbstractComponentProvider
|
class ViewProvider extends AbstractComponentProvider
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(!function_exists('app')) {
|
if(!function_exists('app')) {
|
||||||
function app(): ?\Musoka\Zap\Application
|
function app(): ?\CrocWork\Zappy\Application
|
||||||
{
|
{
|
||||||
return \Musoka\Zap\Application::getInstance();
|
return \CrocWork\Zappy\Application::getInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue