承接 koine/http 相关项目开发

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

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

koine/http

Composer 安装命令:

composer require koine/http

包简介

Http objects for handling requests and responses

README 文档

README

Work in progress Http models

Code information:

Build Status Coverage Status Code Climate Scrutinizer Code Quality

Package information:

Latest Stable Version Total Downloads Latest Unstable Version License Dependency Status

Usage

namespace Koine\Http;

$env     = new Environment($_SERVER);
$cookies = new Cookies($_COOKIE);
$session = new Session($_SESSION);
$params  = new Params($_REQUEST);

$request = new Request(array(
    'environment' => $env,
    'cookies'     => $cookies,
    'session'     => $session,
    'params'      => $params,
));

$hello = function ($request) {

    $response = new Response(array(
        'cookies' => $cookies,
    ));

    return $response->setBody('Hello Word!');
};

// If page is hello

$hello()->send();

$redirect = function ($request) {

    $response = new Response(array(
          'cookies' => $cookies,
    ));

    return $response->setRedirect('/');
};

// If page is redirect

$redirect()->send();

Installing

Via Composer

Append the lib to your requirements key in your composer.json.

{
    // composer.json
    // [..]
    require: {
        // append this line to your requirements
        "koine/http": "dev-master"
    }
}

Alternative install

Issues/Features proposals

Here is the issue tracker.

Contributing

Only TDD code will be accepted. Please follow the PSR-2 code standard.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

How to run the tests:

phpunit --configuration tests/phpunit.xml

To check the code standard run:

phpcs --standard=PSR2 lib
phpcs --standard=PSR2 tests

Lincense

MIT

Authors

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固