Compare commits

..

No commits in common. "28f9563251f90a0ffbaae1c3980e603b1003a283" and "b1aa1608c38192bca856f2451d542acacaf95529" have entirely different histories.

33 changed files with 54 additions and 91 deletions

View file

@ -2,9 +2,9 @@
namespace PHPSTORM_META
{
use CrocWork\Zappy\Application;
use Musoka\Zap\Application;
override(Application::get(), map([
'router' => CrocWork\Zappy\Routing\Router::class
'router' => Musoka\Zap\Routing\Router::class
]));
}

View file

@ -1,38 +1 @@
# 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.

View file

@ -1,6 +1,6 @@
{
"name": "crocwork/zappy-base",
"description": "Zappy PHP MicroFramework for quick projects.",
"description": "PHP microframework for Musoka projects.",
"type": "library",
"license": "MIT",
"autoload": {
@ -8,13 +8,13 @@
"src/helpers.php"
],
"psr-4": {
"CrocWork\\Zappy\\": "src/"
"Musoka\\Zap\\": "src/"
}
},
"authors": [
{
"name": "Fristi",
"email": "fristi@subcon.town"
"email": "support@musoka.network"
}
],
"minimum-stability": "stable",

View file

@ -1,14 +1,14 @@
<?php
namespace CrocWork\Zappy;
namespace Musoka\Zap;
use CrocWork\Zappy\Components\ComponentAggregator;
use CrocWork\Zappy\Components\ComponentProviderInterface;
use CrocWork\Zappy\Config\ConfigRepository;
use CrocWork\Zappy\ErrorHandling\Handler;
use CrocWork\Zappy\View\Renderable;
use CrocWork\Zappy\Http\Request;
use CrocWork\Zappy\Http\Response;
use Musoka\Zap\Components\ComponentAggregator;
use Musoka\Zap\Components\ComponentProviderInterface;
use Musoka\Zap\Config\ConfigRepository;
use Musoka\Zap\ErrorHandling\Handler;
use Musoka\Zap\View\Renderable;
use Musoka\Zap\Http\Request;
use Musoka\Zap\Http\Response;
/**

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Components;
namespace Musoka\Zap\Components;
abstract class AbstractComponentProvider implements ComponentProviderInterface
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Components;
namespace Musoka\Zap\Components;
interface BootableProviderInterface extends ComponentProviderInterface
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Components;
namespace Musoka\Zap\Components;
class ComponentAggregator
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Components;
namespace Musoka\Zap\Components;
interface ComponentProviderInterface
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Config;
namespace Musoka\Zap\Config;
class ConfigRepository
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy;
namespace Musoka\Zap;
class DIContainer
{

View file

@ -1,8 +1,8 @@
<?php
namespace CrocWork\Zappy\ErrorHandling;
namespace Musoka\Zap\ErrorHandling;
use CrocWork\Zappy\Application;
use Musoka\Zap\Application;
class Handler
{

View file

@ -1,6 +1,6 @@
<?php
if(!function_exists('translator')) {
function translator(): \CrocWork\Zappy\I18n\Translator
function translator(): \Musoka\Zap\I18n\Translator
{
return app()->get('translator');
}

View file

@ -1,6 +1,6 @@
<?php
if(!function_exists('view')) {
function view(string $view, array $data = []): \CrocWork\Zappy\View\View
function view(string $view, array $data = []): \Musoka\Zap\View\View
{
$factory = app()->get('view');
if($factory) {

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Http;
namespace Musoka\Zap\Http;
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Http;
namespace Musoka\Zap\Http;
class Response extends \Symfony\Component\HttpFoundation\Response
{

View file

@ -1,9 +1,9 @@
<?php
namespace CrocWork\Zappy\I18n;
namespace Musoka\Zap\I18n;
use CrocWork\Zappy\Components\AbstractComponentProvider;
use CrocWork\Zappy\Components\ComponentAggregator;
use Musoka\Zap\Components\AbstractComponentProvider;
use Musoka\Zap\Components\ComponentAggregator;
class I18nProvider extends AbstractComponentProvider
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\I18n;
namespace Musoka\Zap\I18n;
/**
* Translator class

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
trait IsRepository
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
class LocalizedRepository extends Repository
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
class LocalizedRoute extends Route
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
class Repository
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
class Route
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
class RouteGroup
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
class RouteRepository
{

View file

@ -1,10 +1,10 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
use CrocWork\Zappy\Application;
use Musoka\Zap\Application;
use Symfony\Component\HttpFoundation\HeaderBag;
use CrocWork\Zappy\Http\Request;
use Musoka\Zap\Http\Request;
class Router implements RouterInterface
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
interface RouterInterface
{

View file

@ -1,9 +1,9 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
use CrocWork\Zappy\Components\AbstractComponentProvider;
use CrocWork\Zappy\Components\ComponentAggregator;
use Musoka\Zap\Components\AbstractComponentProvider;
use Musoka\Zap\Components\ComponentAggregator;
class RouterProvider extends AbstractComponentProvider
{

View file

@ -1,8 +1,8 @@
<?php
namespace CrocWork\Zappy\Routing;
namespace Musoka\Zap\Routing;
use CrocWork\Zappy\I18n\Translator;
use Musoka\Zap\I18n\Translator;
use Symfony\Component\HttpFoundation\Request;
class UrlGenerator

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\View;
namespace Musoka\Zap\View;
interface Renderable
{

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\View;
namespace Musoka\Zap\View;
enum SectionMode {
case OVERWRITE;

View file

@ -1,6 +1,6 @@
<?php
namespace CrocWork\Zappy\View;
namespace Musoka\Zap\View;
class ViewFactory
{

View file

@ -1,9 +1,9 @@
<?php
namespace CrocWork\Zappy\View;
namespace Musoka\Zap\View;
use CrocWork\Zappy\Components\AbstractComponentProvider;
use CrocWork\Zappy\Components\ComponentAggregator;
use Musoka\Zap\Components\AbstractComponentProvider;
use Musoka\Zap\Components\ComponentAggregator;
class ViewProvider extends AbstractComponentProvider
{

View file

@ -1,9 +1,9 @@
<?php
if(!function_exists('app')) {
function app(): ?\CrocWork\Zappy\Application
function app(): ?\Musoka\Zap\Application
{
return \CrocWork\Zappy\Application::getInstance();
return \Musoka\Zap\Application::getInstance();
}
}