Rack::init PHP Method

init() public static method

public static init ( $middleware = [] )
    public static function init($middleware = array())
    {
        // easy initialization
        if (!empty($middleware) && is_array($middleware)) {
            $ware = array();
            foreach ($middleware as $key => $value) {
                $ware[$value] = true;
            }
            self::$middleware = array_merge(self::$middleware, $ware);
        }
        // don't output anything before Rack has output it's headers
        ob_start();
        self::$ob_started = true;
    }