Compare commits

..

2 commits

Author SHA1 Message Date
Fristi 28f9563251
Updated README.md. 2024-05-19 20:57:46 +02:00
Fristi dcc518ede7
Updated namespaces to definitive ones. 2024-05-19 20:57:26 +02:00
33 changed files with 91 additions and 54 deletions

View file

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

View file

@ -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.

View file

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

View file

@ -1,14 +1,14 @@
<?php
namespace Musoka\Zap;
namespace CrocWork\Zappy;
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;
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;
/**

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
<?php
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');
if($factory) {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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