Overview

Namespaces

  • MvcCore
    • Ext
      • Auth
        • Virtual
      • Debug
        • Tracy
      • Form
        • Core
        • Validators
      • Request
      • Router
        • Lang
      • View
        • Helpers
  • None

Classes

  • ApacheDpi
  • Cli
  • Overview
  • Namespace
  • Class
  • Tree

Class Cli

MvcCore Cli Request extension: - linear request url parsing from $_SERVER into local properties describing app root and params - params reading from $_SERVER['argv'] in double dash, single dash or no dash form with or without equal char - params cleaning by developer rules

MvcCore\Request
Extended by MvcCore\Ext\Request\Cli
Namespace: MvcCore\Ext\Request
Located at ext-request-cli/src/MvcCore/Ext/Request/Cli.php
Methods summary
public
# __construct( array & $server, array & $get, array & $post )

Get everytime new instance of http request, global variables should be changed and injected here to get different request object from currently called real request.

Get everytime new instance of http request, global variables should be changed and injected here to get different request object from currently called real request.

Parameters

$server
$get
$post

Overrides

MvcCore\Request::__construct()
protected
# initScriptName( )

Initialize index.php script name.

Initialize index.php script name.

Overrides

MvcCore\Request::initScriptName()
protected
# initAppRoot( )

Initialize application root directory.

Initialize application root directory.

Overrides

MvcCore\Request::initAppRoot()
protected
# initCliParams( )

Initialize params from cli.

Initialize params from cli.

Example

php index.php -c index -a index --id 10 --switch -sw php index.php --controller index --action index --id 10 --switch --s --w php index.php --controller=index --action=index -id 10 --switch -sw


protected
# initCliParamSingleDash( $i, & $params, & $rawArg, & $nextRawArg, & $nextRawArgIsValue )

Initialize params from cli, starting with single dash, with value assigned by equal char or after space as another query part if any, else boolean true.

Initialize params from cli, starting with single dash, with value assigned by equal char or after space as another query part if any, else boolean true.

protected
# initCliParamDoubleDash( $i, & $params, & $rawArg, & $nextRawArg, & $nextRawArgIsValue )

Initialize params from cli, starting with double dash, with value assigned by equal char or after space as another query part if any, else boolean true.

Initialize params from cli, starting with double dash, with value assigned by equal char or after space as another query part if any, else boolean true.

protected
# initCliParamNoDash( & $params, & $rawArg )

Initialize params from cli, starting without dash, with value assigned by equal char or after space as another query part if any, else boolean true.

Initialize params from cli, starting without dash, with value assigned by equal char or after space as another query part if any, else boolean true.

protected
# initCliParamsCleanQuotes( & $params )

Initialize params from cli, clean trailing quotes: " ' `

Initialize params from cli, clean trailing quotes: " ' `

Methods inherited from MvcCore\Request
GetInstance(), GetParam(), IsAppRequest(), SetParam(), __call(), __get(), __set(), initBasePath(), initHttpParams(), initMethod(), initParsedUrlSegments(), initPath(), initProtocol(), initReferer(), initUrlCompositions()
Constants summary
string VERSION

MvcCore Extension - Request CLI - version: Comparation by PHP function version_compare();

MvcCore Extension - Request CLI - version: Comparation by PHP function version_compare();

See

http://php.net/manual/en/function.version-compare.php
# '4.2.0'
Constants inherited from MvcCore\Request
METHOD_GET, METHOD_POST, PROTOCOL_HTTP, PROTOCOL_HTTPS
Properties summary
public boolean $Console

Application console mode. TRUE if application is running in console mode (php_sapi_name() == 'cli').

Application console mode. TRUE if application is running in console mode (php_sapi_name() == 'cli').

# FALSE
Properties inherited from MvcCore\Request
$AppRoot, $BasePath, $BaseUrl, $DomainUrl, $Fragment, $FullUrl, $Host, $Lang, $Locale, $MediaSiteKey, $Method, $Params, $Path, $Port, $Protocol, $Query, $Referer, $RequestPath, $RequestUrl, $ScriptName, $ServerName, $appRequest, $getGlobals, $indexScriptName, $postGlobals, $serverGlobals
MvcCore API documentation generated by ApiGen