2017 © Pedro Peláez
 

library autumn

php annotation mvc

image

smiler/autumn

php annotation mvc

  • Tuesday, July 18, 2017
  • by spiderman
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

autumn

php annotation mvc, (*1)

Installation

Install the latest version with, (*2)

$ composer require smiler/autumn

Basic Usage

<?php

/**
 * @controller
 * @path ("/hw")
 */
class HelloWorld
{

    /**
     * @autowired ({"name":"hello_world"})
     */
    private $helloWorldModel;

    /**
     * @route({"method":["GET","POST"],"path":"/"})
     */
    public function doSomething1()
    {
        $this->helloWorldModel->execute();
    }
}

<?php
/**
 * @model (hello_world)
 */
class HelloWorldModel
{

    /**
     * @database ({"name":"source_name"})
     */
    private $db;

    public function execute()
    {
        echo 345677;
    }
}

Attention

the name of php file must be equals to the class name,eg., (*3)

HelloWorld.php

class HelloWorld{}

Documentation

Requirements

  • PHP > 5.4

Author

spiderman - spiderman1517650@163.com, (*4)

License

Autumn is licensed under the MIT License - see the LICENSE file for details, (*5)

Acknowledgements

PHP Reflection JsonPath Class Annotation, (*6)

The Versions

18/07 2017

dev-master

9999999-dev

php annotation mvc

  Sources   Download

MIT

The Requires

 

by Avatar spiderman

restful smiler autumn