Properties

$dispatcher

$dispatcher : \ManaPHP\Http\DispatcherInterface

Type

\ManaPHP\Http\DispatcherInterface

$validator

$validator : \ManaPHP\Validating\ValidatorInterface

Type

\ManaPHP\Validating\ValidatorInterface

$_context

$_context : \ManaPHP\Http\RequestContext

Type

\ManaPHP\Http\RequestContext

$alias

$alias : \ManaPHP\AliasInterface

Type

\ManaPHP\AliasInterface

$eventsManager

$eventsManager : \ManaPHP\Event\ManagerInterface

Type

\ManaPHP\Event\ManagerInterface

$logger

$logger : \ManaPHP\Logging\LoggerInterface

Type

\ManaPHP\Logging\LoggerInterface

$configure

$configure : \ManaPHP\Configuration\Configure

Type

\ManaPHP\Configuration\Configure

$settings

$settings : \ManaPHP\Configuration\SettingsInterface

Type

\ManaPHP\Configuration\SettingsInterface

$crypt

$crypt : \ManaPHP\Security\CryptInterface

Type

\ManaPHP\Security\CryptInterface

$identity

$identity : \ManaPHP\IdentityInterface

Type

\ManaPHP\IdentityInterface

$cache

$cache : \ManaPHP\Caching\CacheInterface

Type

\ManaPHP\Caching\CacheInterface

$httpClient

$httpClient : \ManaPHP\Http\ClientInterface

Type

\ManaPHP\Http\ClientInterface

$restClient

$restClient : \ManaPHP\Http\ClientInterface

Type

\ManaPHP\Http\ClientInterface

$db

$db : \ManaPHP\Data\DbInterface

Type

\ManaPHP\Data\DbInterface

$redisCache

$redisCache : \Redis|\ManaPHP\Data\RedisInterface

Type

\Redis|\ManaPHP\Data\RedisInterface

$redisDb

$redisDb : \Redis|\ManaPHP\Data\RedisInterface

Type

\Redis|\ManaPHP\Data\RedisInterface

$redisBroker

$redisBroker : \Redis|\ManaPHP\Data\RedisInterface

Type

\Redis|\ManaPHP\Data\RedisInterface

$mongodb

$mongodb : \ManaPHP\Data\MongodbInterface

Type

\ManaPHP\Data\MongodbInterface

$rabbitmq

$rabbitmq : \ManaPHP\Messaging\AmqpInterface

Type

\ManaPHP\Messaging\AmqpInterface

$elasticsearch

$elasticsearch : \Elasticsearch\Client

Type

\Elasticsearch\Client

$mailer

$mailer : \ManaPHP\Mailing\MailerInterface

Type

\ManaPHP\Mailing\MailerInterface

$bosClient

$bosClient : \ManaPHP\Bos\ClientInterface

Type

\ManaPHP\Bos\ClientInterface

$wspClient

$wspClient : \ManaPHP\Ws\Pushing\ClientInterface

Type

\ManaPHP\Ws\Pushing\ClientInterface

$coroutineManager

$coroutineManager : \ManaPHP\Coroutine\ManagerInterface

Type

\ManaPHP\Coroutine\ManagerInterface

$wsClient

$wsClient : \ManaPHP\Ws\ClientInterface

Type

\ManaPHP\Ws\ClientInterface

$pubSub

$pubSub : \ManaPHP\Messaging\PubSubInterface

Type

\ManaPHP\Messaging\PubSubInterface

$_context

$_context : \object

Type

\object

$_di

$_di : \ManaPHP\DiInterface

Type

\ManaPHP\DiInterface

$_object_id

$_object_id : integer

Type

integer

$_on

$_on : array<mixed,callable>

Type

array<mixed,callable>

$_injections

$_injections : array

Type

array

Methods

getInstance()

getInstance(string  $class, array  $params = array()) : mixed

Parameters

string $class
array $params

Returns

mixed

getShared()

getShared(string  $name) : mixed

Parameters

string $name

Returns

mixed

inject()

inject(string  $name, mixed  $target) : static

Parameters

string $name
mixed $target

Returns

static

__get()

__get(string  $name) : mixed

Magic method __get

Parameters

string $name

Returns

mixed

__set()

__set(string  $name, mixed  $value) : void

Parameters

string $name
mixed $value

__isset()

__isset(string  $name) : boolean

Parameters

string $name

Returns

boolean

attachEvent()

attachEvent(string  $event, callable  $handler, boolean  $appended = true) : static

Attach a listener to the events manager

Parameters

string $event
callable $handler
boolean $appended

Returns

static

detachEvent()

detachEvent(string  $event, callable  $handler) : static

Parameters

string $event
callable $handler

Returns

static

peekEvent()

peekEvent(string  $group, callable  $handler) : static

Parameters

string $group
callable $handler

Returns

static

fireEvent()

fireEvent(string  $event, mixed  $data = array(), mixed  $source = null) : void

Fires an event in the events manager causing that the active listeners will be notified about it

Parameters

string $event
mixed $data
mixed $source

on()

on(string  $event, callable  $handler) : static

Parameters

string $event
callable $handler

Returns

static

off()

off(string  $event = null, callable  $handler = null) : static

Parameters

string $event
callable $handler

Returns

static

emit()

emit(string  $event, array  $data = array()) : void

Parameters

string $event
array $data

__debugInfo()

__debugInfo() : array

Returns

array

dump()

dump() : array

Returns

array

toArray()

toArray() : array

Returns

array

jsonSerialize()

jsonSerialize() 

prepare()

prepare(array  $GET, array  $POST, array  $SERVER, string  $RAW_BODY = null, array  $COOKIE = array(), array  $FILES = array()) : void

Parameters

array $GET
array $POST
array $SERVER
string $RAW_BODY
array $COOKIE
array $FILES

getRawBody()

getRawBody() : string

Returns

string

setParams()

setParams(array  $params) : static

Parameters

array $params

Returns

static

getCookie()

getCookie(string  $name = null, string  $default = '') : string|array

Gets a cookie

Parameters

string $name
string $default

Returns

string|array

hasCookie()

hasCookie(string  $name) : boolean

Parameters

string $name

Returns

boolean

get()

get(string  $name = null, mixed  $default = null) : mixed

Gets a variable from the $_REQUEST

Parameters

string $name
mixed $default

Returns

mixed

getId()

getId(string  $name = 'id') : integer|string

Parameters

string $name

Returns

integer|string

getServer()

getServer(string  $name = null, mixed  $default = '') : mixed

Gets variable from $_SERVER

Parameters

string $name
mixed $default

Returns

mixed

setServer()

setServer(string  $name, string  $value) : static

Parameters

string $name
string $value

Returns

static

getMethod()

getMethod() : string

Returns

string

has()

has(string  $name) : boolean

Checks whether $_REQUEST has certain index

Parameters

string $name

Returns

boolean

hasServer()

hasServer(string  $name) : boolean

Parameters

string $name

Returns

boolean

getScheme()

getScheme() : string

Gets HTTP schema (http/https)

Returns

string

isAjax()

isAjax() : boolean

Checks whether request has been made using ajax

Returns

boolean

isWebSocket()

isWebSocket() : boolean

Returns

boolean

getClientIp()

getClientIp() : string

Returns

string

getUserAgent()

getUserAgent(integer  $max_len = -1) : string

Gets HTTP user agent used to made the request

Parameters

integer $max_len

Returns

string

isPost()

isPost() : boolean

Checks whether HTTP method is POST.

Returns

boolean

isGet()

isGet() : boolean

Checks whether HTTP method is GET.

Returns

boolean

isPut()

isPut() : boolean

Checks whether HTTP method is PUT.

Returns

boolean

isPatch()

isPatch() : boolean

Checks whether HTTP method is PATCH.

Returns

boolean

isHead()

isHead() : boolean

Checks whether HTTP method is HEAD.

Returns

boolean

isDelete()

isDelete() : boolean

Checks whether HTTP method is DELETE.

Returns

boolean

isOptions()

isOptions() : boolean

Checks whether HTTP method is OPTIONS.

Returns

boolean

hasFiles()

hasFiles(boolean  $onlySuccessful = true) : boolean

Checks whether request includes attached files http://php.net/manual/en/features.file-upload.multiple.php

Parameters

boolean $onlySuccessful

Returns

boolean

getFiles()

getFiles(boolean  $onlySuccessful = true) : array<mixed,\ManaPHP\Http\Request\File>

Gets attached files as \ManaPHP\Http\Request\File instances

Parameters

boolean $onlySuccessful

Returns

array<mixed,\ManaPHP\Http\Request\File>

getReferer()

getReferer(integer  $max_len = -1) : string

Gets web page that refers active request. ie: http://www.google.com

Parameters

integer $max_len

Returns

string

getOrigin()

getOrigin(boolean  $strict = true) : string

Parameters

boolean $strict

Returns

string

getHost()

getHost() : string

Returns

string

getUrl()

getUrl() : string

http://localhost:8080/test/test.jsp

Returns

string

getUri()

getUri() : string

/test/test.jsp

Returns

string

getToken()

getToken(string  $name = 'token') : string|null

Parameters

string $name

Returns

string|null

getRequestId()

getRequestId() : string

Returns

string

setRequestId()

setRequestId(string  $request_id = null) : void

Parameters

string $request_id

getRequestTime()

getRequestTime() : float

Returns

float

getElapsedTime()

getElapsedTime(integer  $precision = 3) : float

Parameters

integer $precision

Returns

float

getIfNoneMatch()

getIfNoneMatch() : string|null

Returns

string|null

getAcceptLanguage()

getAcceptLanguage() : string|null

Returns

string|null

_createContext()

_createContext() : object

Returns

object

_normalizeValue()

_normalizeValue(string  $field, mixed  $value, mixed  $default) : mixed

Parameters

string $field
mixed $value
mixed $default

Returns

mixed