mary-shelley / Frankie
A frankenstein framework - middleware and annotation based
Stars: ✭ 19
Projects that are alternatives of or similar to Frankie
Dntframeworkcore
Lightweight and Extensible Infrastructure for Building Web Applications - Web Application Framework
Stars: ✭ 208 (+994.74%)
Mutual labels: framework, aop
Framework
💎 Go! AOP PHP - modern aspect-oriented framework for the new level of software development
Stars: ✭ 1,559 (+8105.26%)
Mutual labels: framework, aop
Puresharp
Puresharp is a Framework that provides the essential APIs (AOP, IOC, etc...) to productively build high quality (.NET 4.5.2+ & .NET Core 2.1+) applications through reliability, scalability and performance without no compromise
Stars: ✭ 120 (+531.58%)
Mutual labels: framework, aop
Laravel Zero
A PHP framework for console artisans
Stars: ✭ 2,821 (+14747.37%)
Mutual labels: framework, symfony
Idea Php Annotation Plugin
Add PHP annotation support for PhpStorm and IntelliJ
Stars: ✭ 216 (+1036.84%)
Mutual labels: symfony, annotation
Phpboot
☕️ 🚀 tiny & fast PHP framework for building Microservices/RESTful APIs, with useful features: IOC, Hook, ORM, RPC, Swagger, Annotation, Parameters binding, Validation, etc.
Stars: ✭ 638 (+3257.89%)
Mutual labels: framework, annotation
Silex
[DEPRECATED -- Use Symfony instead] The PHP micro-framework based on the Symfony Components
Stars: ✭ 3,646 (+19089.47%)
Mutual labels: framework, symfony
Nodefony Starter
Nodefony Starter Node.js Framework
Stars: ✭ 95 (+400%)
Mutual labels: framework, symfony
Idea Php Symfony2 Plugin
IntelliJ IDEA / PhpStorm Symfony Plugin
Stars: ✭ 797 (+4094.74%)
Mutual labels: symfony, annotation
Lithium
li₃ is the fast, flexible and most RAD development framework for PHP
Stars: ✭ 1,176 (+6089.47%)
Mutual labels: framework, aop
Htframework
Unity HTFramework, a rapid development framework of client to the unity.
Stars: ✭ 179 (+842.11%)
Mutual labels: framework, aop
Swoft Framework
[READ ONLY] Swoft Framework, base of Swoft
Stars: ✭ 70 (+268.42%)
Mutual labels: framework, aop
Bear.sunday
A resource-oriented application framework
Stars: ✭ 230 (+1110.53%)
Mutual labels: framework, aop
Idea Php Drupal Symfony2 Bridge
PhpStorm plugin to support Symfony components inside Drupal 8
Stars: ✭ 34 (+78.95%)
Mutual labels: symfony, annotation
Controllerextrabundle
Controller extra Bundle for Symfony2
Stars: ✭ 157 (+726.32%)
Mutual labels: symfony, annotation
Hyperf
🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.
Stars: ✭ 4,206 (+22036.84%)
Mutual labels: framework, aop
Sylius
Open Source eCommerce Platform on Symfony
Stars: ✭ 6,598 (+34626.32%)
Mutual labels: framework, symfony
Frankie - A frankenstein micro-framework for PHP
Features
Frankie is a micro-framework focused on annotation. The goal is to use annotation in order to do almost everything in the framework.
- Annotated Routes (Routing)
- Annotated Injections (Dependencies)
- Annotated Request Flow (Application Flow)
Mainly Frankie is a framework for create RESTful applications and microservices.
Discover more on the documentation
Hands-on!
The goal is focus on actions and attach before and action events using annotations
<?php
/**
* @Before(targetClass="HttpAuth", targetMethod="basic")
* @After(targetClass="Serializer", targetMethod="toJson")
*/
class MyController
{
/**
* @Inject
* @var Zend\EventManager\EventManager
*/
private $eventManager;
/**
* @Route("/my/path/{id}", methods={"GET"})
* @Before(targetClass="MyHook\ThisOne", targetMethod="count")
* @Before(targetClass="Stopwatch", targetMethod="start")
* @After(targetClass="Stopwatch", targetMethod="stop")
*/
public function get(Request $request, Response $response, $id)
{
// ...
$this->eventManager->trigger("mark-it", $element);
// ...
}
}
Testing with SpecBDD - PHPSpec
<?php
namespace spec;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Zend\EventManager\EventManager;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class MyControllerSpec extends ObjectBehavior
{
function let(EventManager $em)
{
$this->setEventManager($em);
}
function it_is_initializable()
{
$this->shouldHaveType('MyController');
}
function it_should_trigger_the_mark_event(
Request $request, Response $response, EventManager $em
)
{
$em->trigger("mark-it", Argument::Any())->shouldBeCalledTimes(1);
$this->get($request, $response);
}
}
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].