Constants

MESSAGE_METADATA

MESSAGE_METADATA = '_metadata_'

Properties

$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

$_url

$_url : string

Type

string

$_connection

$_connection : \AMQPConnection

Type

\AMQPConnection

$_channel

$_channel : \AMQPChannel

Type

\AMQPChannel

$_exchanges

$_exchanges : array<mixed,\AMQPExchange>

Type

array<mixed,\AMQPExchange>

$_queues

$_queues : array<mixed,\AMQPQueue>

Type

array<mixed,\AMQPQueue>

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

__construct()

__construct(string  $url = null) 

Parameters

string $url

getChannel()

getChannel() : \AMQPChannel

Returns

\AMQPChannel

qos()

qos(integer  $count, integer  $size) : static

Parameters

integer $count
integer $size

Returns

static

declareExchange()

declareExchange(string  $name, string  $type = AMQP_EX_TYPE_DIRECT, integer  $flags = AMQP_DURABLE) : \AMQPExchange

Parameters

string $name
string $type
integer $flags

support the following flags: AMQP_DURABLE, AMQP_PASSIVE.

Returns

\AMQPExchange

getExchanges()

getExchanges(boolean  $name_only = true) : array<mixed,\AMQPExchange>|array<mixed,string>

Parameters

boolean $name_only

Returns

array<mixed,\AMQPExchange>|array<mixed,string>

deleteExchange()

deleteExchange(string  $name, integer  $flags = AMQP_NOPARAM) : static

Parameters

string $name
integer $flags

Optionally AMQP_IFUNUSED can be specified to indicate the exchange should not be deleted until no clients are connected to it.

Returns

static

declareQueue()

declareQueue(string  $name, integer  $flags = AMQP_DURABLE) : \AMQPQueue

Parameters

string $name
integer $flags

Returns

\AMQPQueue

getQueues()

getQueues(boolean  $name_only = true) : array<mixed,\AMQPQueue>|array<mixed,string>

Parameters

boolean $name_only

Returns

array<mixed,\AMQPQueue>|array<mixed,string>

bindQueue()

bindQueue(string  $queue, string  $exchange, string  $binding_key = '') : static

Parameters

string $queue
string $exchange
string $binding_key

Returns

static

purgeQueue()

purgeQueue(string  $name) : static

Purge the contents of a queue

Parameters

string $name

Returns

static

deleteQueue()

deleteQueue(string  $name) : static

Parameters

string $name

Returns

static

publishMessage()

publishMessage(string  $message, string  $exchange, string  $routing_key = '', integer  $flags = AMQP_NOPARAM, array  $attributes = array()) : static

Parameters

string $message
string $exchange
string $routing_key
integer $flags

One or more of AMQP_MANDATORY and AMQP_IMMEDIATE

array $attributes

Returns

static

publishJsonMessage()

publishJsonMessage(array|\JsonSerializable  $message, string  $exchange, string  $routing_key = '', integer  $flags = AMQP_NOPARAM, array  $attributes = array()) : static

Parameters

array|\JsonSerializable $message
string $exchange
string $routing_key
integer $flags

One or more of AMQP_MANDATORY and AMQP_IMMEDIATE

array $attributes

Returns

static

getMessage()

getMessage(string  $queue, boolean  $auto_ack = false) : false|\ManaPHP\Messaging\Amqp\Message

Parameters

string $queue
boolean $auto_ack

Returns

false|\ManaPHP\Messaging\Amqp\Message

getJsonMessage()

getJsonMessage(string  $queue, boolean  $auto_ack = false) : false|array

Parameters

string $queue
boolean $auto_ack

Returns

false|array

ackMessage()

ackMessage(\ManaPHP\Messaging\Amqp\Message|array  $message, boolean  $multiple = false) : static

Parameters

\ManaPHP\Messaging\Amqp\Message|array $message
boolean $multiple

Returns

static

nackMessage()

nackMessage(\ManaPHP\Messaging\Amqp\Message|array  $message, boolean  $multiple = false) : static

Parameters

\ManaPHP\Messaging\Amqp\Message|array $message
boolean $multiple

Returns

static

consumeMessages()

consumeMessages(string  $queue, callable  $callback, integer  $flags = AMQP_NOPARAM) : void

Parameters

string $queue
callable $callback
integer $flags

_createContext()

_createContext() : object

Returns

object