示例#1
0
文件: Bin.php 项目: selvinortiz/hello
<?php

namespace SelvinOrtiz\Http\Hello;

class Bin extends \SelvinOrtiz\Zit\Zit
{
    public function run()
    {
        $bin = Bin::getInstance();
        $bin->extend('status', function ($vars = array()) {
            return new HttpStatus($vars);
        });
        $bin->extend('request', function ($url, $method, $data = array(), $headers = array()) {
            return new HttpRequest($url, $method, $data, $headers);
        });
        $bin->extend('response', function ($response, $content) {
            return new HttpResponse($response, $content);
        });
    }
}
Bin::run();