承接 zweifisch/zf 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zweifisch/zf

Composer 安装命令:

composer require zweifisch/zf

包简介

a micro php web/cli framework/router

README 文档

README

a micro php framework for both web and cli

requires php 5.6

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

tests

to run tests

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

统计信息

  • 总下载量: 115
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 32
  • Watchers: 6
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-04-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固