Properties

$request

$request : \ManaPHP\Http\RequestInterface

Type

\ManaPHP\Http\RequestInterface

$url

$url : \ManaPHP\Http\UrlInterface

Type

\ManaPHP\Http\UrlInterface

$router

$router : \ManaPHP\Http\RouterInterface

Type

\ManaPHP\Http\RouterInterface

$_context

$_context : \ManaPHP\Http\ResponseContext

Type

\ManaPHP\Http\ResponseContext

$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() 

setCookie()

setCookie(string  $name, mixed  $value, integer  $expire, string  $path = null, string  $domain = null, boolean  $secure = false, boolean  $httponly = true) : static

Sets a cookie to be sent at the end of the request

Parameters

string $name
mixed $value
integer $expire
string $path
string $domain
boolean $secure
boolean $httponly

Returns

static

deleteCookie()

deleteCookie(string  $name, string  $path = null, string  $domain = null, boolean  $secure = false, boolean  $httponly = true) : static

Deletes a cookie by its name

Parameters

string $name
string $path
string $domain
boolean $secure
boolean $httponly

Returns

static

setStatus()

setStatus(integer  $code, string  $text = null) : static

Sets the HTTP response code

Parameters

integer $code
string $text

Returns

static

getStatus()

getStatus() : string

Returns

string

getStatusCode()

getStatusCode() : integer

Returns

integer

getStatusText()

getStatusText(integer  $code = null) : string

Parameters

integer $code

Returns

string

setHeader()

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

Overwrites a header in the response

Parameters

string $name
string $value

Returns

static

getHeader()

getHeader(string  $name, string  $default = null) : string

Parameters

string $name
string $default

Returns

string

hasHeader()

hasHeader(string  $name) : boolean

Parameters

string $name

Returns

boolean

removeHeader()

removeHeader(string  $name) : static

Parameters

string $name

Returns

static

setExpires()

setExpires(integer  $timestamp) : static

Sets a Expires header to use HTTP cache

Parameters

integer $timestamp

Returns

static

setNotModified()

setNotModified() : static

Sets a Not-Modified response

Returns

static

setETag()

setETag(string  $etag) : static

Set a custom ETag

Parameters

string $etag

Returns

static

setCacheControl()

setCacheControl(string  $control) : static

Parameters

string $control

Returns

static

setMaxAge()

setMaxAge(integer  $age, string  $extra = null) : static

Parameters

integer $age
string $extra

Returns

static

setContentType()

setContentType(string  $contentType, string  $charset = null) : static

Sets the response content-type mime, optionally the charset

Parameters

string $contentType
string $charset

Returns

static

getContentType()

getContentType() : string

Returns

string

redirect()

redirect(string|array  $location, boolean  $temporarily = true) : static

Redirect by HTTP to another action or URL

Parameters

string|array $location
boolean $temporarily

Returns

static

setContent()

setContent(string  $content) : static

Sets HTTP response body

Parameters

string $content

Returns

static

setJsonOk()

setJsonOk(string  $message = '') : static

Parameters

string $message

Returns

static

setJsonError()

setJsonError(string  $message, integer  $code = 1) : static

Parameters

string $message
integer $code

Returns

static

setJsonData()

setJsonData(mixed  $data, string  $message = '') : static

Parameters

mixed $data
string $message

Returns

static

setJsonContent()

setJsonContent(array|\JsonSerializable|string|\Exception  $content) : static

Sets HTTP response body. The parameter is automatically converted to JSON

Parameters

array|\JsonSerializable|string|\Exception $content

Returns

static

getContent()

getContent() : string

Gets the HTTP response body

Returns

string

setFile()

setFile(string  $file, string  $attachmentName = null) : static

Sets an attached file to be sent at the end of the request

Parameters

string $file
string $attachmentName

Returns

static

getFile()

getFile() : string|null

Returns

string|null

setAttachment()

setAttachment(string  $attachmentName) : static

Parameters

string $attachmentName

Returns

static

setCsvContent()

setCsvContent(array  $rows, string  $name, array|string  $header = null) : static

Parameters

array $rows
string $name
array|string $header

Returns

static

getHeaders()

getHeaders() : array

Returns

array

_createContext()

_createContext() : object

Returns

object