2017 © Pedro Peláez
 

library zf

a micro php web/cli framework/router

image

zweifisch/zf

a micro php web/cli framework/router

  • Wednesday, October 29, 2014
  • by zf
  • Repository
  • 6 Watchers
  • 31 Stars
  • 100 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 17 Forks
  • 0 Open issues
  • 31 Versions
  • 0 % Grown

The README.md

zf Build Status

a micro php framework for both web and cli, (*1)

requires php 5.6, (*2)

a taste of zf

<?php

require 'vendor/autoload.php';

$app = new zf\App;

/**
 * @param int $times an optional param
 */
$app->get('/hello/:name', function($name, $times=1) {
    return ['hello' => $name, 'times' => $times];
});

$app->get('/', function() {
    return $this->render('landing-page');
});

$app->resource('post', 'user');

$app->run();
$ php -S localhost:8000/index.php &> /tmp/server.log
$ curl localhost:8000/hello/foo?times=3
{"hello": "foo", "times': 3}

cli

<?php

require 'vendor/autoload.php';

$app = new zf\App;

/**
 * @param string $name your name
 * @param int $times times to repeat
 */
$app->cmd('hello <name>', function($name, $times=1) {
    return str_repeat("hello $name\n", $times);
})

/**
 * @param bool $showDate also print date
 */
$app->cmd('time', function($showDate=false) {
    return date($showDate ? 'Y-m-d H:i:s' : 'H:i:s');
});

$app->run();
$ php cli.php
Usage:

  php cli.php hello <name>
      name      your name      
      --times   times to repeat

  php cli.php time
      --show-date   also print date
$ php cli.php hello --times=2 zf
hello zf
hello zf

work in progress documentation, (*3)

tests

to run tests, (*4)

composer.phar install --dev
CONFIG_FILE=test/configs.php vendor/bin/phpunit -c test

The Versions

29/10 2014

dev-master

9999999-dev https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

 

The Development Requires

by Feng Zhou

rest cli microframework router rpc

06/08 2013

v0.7.0

0.7.0.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

08/07 2013

v0.6.1

0.6.1.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

06/07 2013

v0.6.0

0.6.0.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

26/06 2013

v0.5.1

0.5.1.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

23/06 2013

v0.5.0

0.5.0.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

15/06 2013

v0.4.0

0.4.0.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

09/06 2013

v0.3.4

0.3.4.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

08/06 2013

v0.3.3

0.3.3.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

07/06 2013

v0.3.2

0.3.2.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

04/06 2013

v0.3.1

0.3.1.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

26/05 2013

v0.3.0

0.3.0.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

24/05 2013

v0.2.9

0.2.9.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

23/05 2013

v0.2.8

0.2.8.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

18/05 2013

v0.2.7

0.2.7.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

16/05 2013

v0.2.6

0.2.6.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

14/05 2013

v0.2.5

0.2.5.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

13/05 2013

v0.2.4

0.2.4.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

12/05 2013

v0.2.3

0.2.3.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

11/05 2013

v0.2.2

0.2.2.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

11/05 2013

v0.2.1

0.2.1.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

11/05 2013

v0.2.0

0.2.0.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Feng Zhou

rest cli microframework router

09/05 2013

v0.1.3

0.1.3.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

06/05 2013

v0.1.2

0.1.2.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

05/05 2013

v0.1.1

0.1.1.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

04/05 2013

v0.1.0

0.1.0.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

04/05 2013

v0.0.5

0.0.5.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

02/05 2013

v0.0.4

0.0.4.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

29/04 2013

v0.0.3

0.0.3.0 https://github.com/zweifisch/zf

a micro php web/cli framework/router

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

28/04 2013

v0.0.2

0.0.2.0 https://github.com/zweifisch/zf

a micro php framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router

28/04 2013

v0.0.1

0.0.1.0 https://github.com/zweifisch/zf

a micro php framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Feng Zhou

rest cli microframework router