CliServer
in package
Bridge the CLI-server environment with Kohana/Sprout.
DO NOT USE THIS IN PRODUCTION.
Table of Contents
Constants
- REWRITES : mixed = ['!^media/(.+)!' => '_media/core/$1', '!^media-...
Methods
- rewrites() : null|string
- Perform rewrites.
- serve() : bool
- Serve things.
Constants
REWRITES
public
mixed
REWRITES
= ['!^media/(.+)!' => '_media/core/$1', '!^media-[0-9]+/(.+)!' => '_media/core/$1', '!^sprout/media/(.+)!' => '_media/sprout/$1', '!^modules/(.+)/media/(.+)!' => '_media/$1/$2', '!^skin/(.+)!' => '_media/skin/$1', '!^skin-[0-9]+/(.+)!' => '_media/skin/$1']
Methods
rewrites()
Perform rewrites.
public
static rewrites(string $path) : null|string
This should match those in the htaccess/nginx configurations.
Parameters
- $path : string
Return values
null|string —the rewritten path, or null if no match
serve()
Serve things.
public
static serve() : bool
Return values
bool —- If true, continue the bootstrap (load kohana/sprout)
- otherwise false - do nothing and let the CLI-server handle the file request.