An open API service indexing awesome lists of open source software.

https://github.com/mary-shelley/frankie

A frankenstein framework - middleware and annotation based
https://github.com/mary-shelley/frankie

annotation aop framework php symfony

Last synced: 6 months ago
JSON representation

A frankenstein framework - middleware and annotation based

Awesome Lists containing this project

README

          

# Frankie - A frankenstein micro-framework for PHP

[![Build Status](https://travis-ci.org/mary-shelley/frankie.svg?branch=master)](https://travis-ci.org/mary-shelley/frankie)

## 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](https://mary-shelley.github.io/docs/)

## Hands-on!

The goal is focus on actions and attach before and action events using
annotations

```php
eventManager->trigger("mark-it", $element);
// ...
}
}

```

### Testing with SpecBDD - PHPSpec

```php
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);
}
}
```