2017 © Pedro Peláez
 

framework micro-framework

Just a simple micro-framework built in top of ZF2 components

image

upcloo/micro-framework

Just a simple micro-framework built in top of ZF2 components

  • Wednesday, February 5, 2014
  • by wdalmut
  • Repository
  • 4 Watchers
  • 2 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 16 Versions
  • 0 % Grown

The README.md

UpCloo MicroFramework with ZF2 components

This is just a simple microframework based on ZF2 components., (*1)

License

This project is released under MIT license., (*2)

Getting started

In the scenario folder you can find not only an example but a typical starting point... You can use a project folder that you prefer but a good starting point is:, (*3)

 - src
   - Your
     - Namespace
 - tests
   - Your
     - Namespace
 - web
 - configs

The entry point (web/index.php), (*4)

<?php
$loader = include __DIR__ . '/vendor/autoload.php';

$loader->add("Your", __DIR__ . '/../src');

$config = new UpCloo\App\Config\ArrayProcessor();
$config->appendConfig(include __DIR__ . '/../configs/app.php');

$engine = new UpCloo\App\Engine();
$boot = new UpCloo\App\Boot($config);

$app = new UpCloo\App($engine, $boot);
$app->run();

Here is a config (configs/app.php), (*5)

<?php
return array(
    "router" => array(
        "routes" => array(
            "home" => array(
                "type" => "Literal",
                "options" => array(
                    "route" => "/walter",
                    'defaults' => array(
                        'controller' => 'Your\\Controller\\Name',
                        'action' => 'hello'
                    )
                ),
                'may_terminate' => true,
            )
        )
    ),
    "services" => array(
        "invokables" => array(
            "Your\\Controller\\Name" => "Your\\Controller\\Name",
        ),
        "factories" => array(
            "example" => function(\Zend\ServiceManager\ServiceLocatorInterface $sl) {
                return "hello";
            }
        ),
    )
);

Start with a controller (src/Your/Controller/Name.php), (*6)

<?php
namespace Your\Controller;

use UpCloo\Controller\ServiceManager;

class Name
{
    use ServiceManager;

    public function hello()
    {
        $hello = $this->services()->get("example");
        return $hello . " " . "world";
    }
}

Start your web service, (*7)

php -S localhost:8080 -t web/ web/index.php

Go to your page -> localhost:8080/walter, (*8)

Build Status

  • Master branch
    • Build Status
  • Develop branch
    • Build Status

The Versions

05/02 2014

dev-develop

dev-develop

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

02/02 2014

dev-master

9999999-dev

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

02/02 2014

0.0.14

0.0.14.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

01/02 2014

0.0.13

0.0.13.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

18/01 2014

0.0.12

0.0.12.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

18/01 2014

0.0.11

0.0.11.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

16/01 2014

0.0.10

0.0.10.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

31/12 2013

0.0.9

0.0.9.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

30/12 2013

0.0.8

0.0.8.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

26/12 2013

0.0.7

0.0.7.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

24/12 2013

0.0.6

0.0.6.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

23/12 2013

0.0.5

0.0.5.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

19/10 2013

0.0.4

0.0.4.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

25/07 2013

0.0.3

0.0.3.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

21/07 2013

0.0.2

0.0.2.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2

21/07 2013

0.0.1

0.0.1.0

Just a simple micro-framework built in top of ZF2 components

  Sources   Download

MIT

The Requires

 

The Development Requires

micro framework zf2