Properties

$request

$request : \ManaPHP\Http\RequestInterface

Type

\ManaPHP\Http\RequestInterface

$relationsManager

$relationsManager : \ManaPHP\Data\Relation\ManagerInterface

Type

\ManaPHP\Data\Relation\ManagerInterface

$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

$_table

$_table : string

Type

string

$_alias

$_alias : string

Type

string

$_fields

$_fields : array

Type

array

$_limit

$_limit : integer

Type

integer

$_offset

$_offset : integer

Type

integer

$_distinct

$_distinct : boolean

Type

boolean

$_model

$_model : \ManaPHP\Data\Model

Type

\ManaPHP\Data\Model

$_multiple

$_multiple : boolean

Type

boolean

$_with

$_with : array

Type

array

$_order

$_order : array

Type

array

$_group

$_group : array

Type

array

$_index

$_index : string|array|callable

Type

string|array|callable

$_aggregate

$_aggregate : array

Type

array

$_force_master

$_force_master : boolean

Type

boolean

$_shard_context

$_shard_context : array

Type

array

$_shard_strategy

$_shard_strategy : callable

Type

callable

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

getIterator()

getIterator() 

setModel()

setModel(\ManaPHP\Data\Model  $model) : static

Parameters

\ManaPHP\Data\Model $model

Returns

static

getModel()

getModel() : \ManaPHP\Data\Model|null

Returns

\ManaPHP\Data\Model|null

shard()

shard(callable  $strategy) : static

Parameters

callable $strategy

Returns

static

getShards()

getShards() : array

Returns

array

getUniqueShard()

getUniqueShard() : array

Returns

array

from()

from(string  $table, string  $alias = null) : static

Parameters

string $table
string $alias

Returns

static

distinct()

distinct(boolean  $distinct = true) : static

Sets SELECT DISTINCT / SELECT ALL flag

Parameters

boolean $distinct

Returns

static

search()

search(array  $filters) : static

Parameters

array $filters

=get_object_vars(new Model)

Returns

static

where()

where(array  $filters) : static

Appends a condition to the current conditions using a AND operator

Parameters

array $filters

=get_object_vars(new Model)

Returns

static

whereDateBetween()

whereDateBetween(string  $field, integer|string  $min, integer|string  $max) : static

Parameters

string $field

=key(get_object_vars(new Model))

integer|string $min
integer|string $max

Returns

static

groupBy()

groupBy(string|array  $groupBy) : static

Sets a GROUP BY clause

Parameters

string|array $groupBy

=get_object_vars(new Model) ?: key(get_object_vars(new Model))

Returns

static

orderBy()

orderBy(string|array  $orderBy) : static

Sets a ORDER BY condition clause

Parameters

string|array $orderBy

=get_object_vars(new Model) ?: key(get_object_vars(new Model)) ?: [$k=>SORT_ASC, $k=>SORT_DESC]

Returns

static

indexBy()

indexBy(callable|string|array  $indexBy) : static

Parameters

callable|string|array $indexBy

=key(get_object_vars(new Model))

Returns

static

limit()

limit(integer  $limit, integer  $offset = null) : static

Sets a LIMIT clause, optionally a offset clause

Parameters

integer $limit
integer $offset

Returns

static

with()

with(string|array  $with) : static

Parameters

string|array $with

Returns

static

page()

page(integer  $size = null, integer  $page = null) : static

Parameters

integer $size
integer $page

Returns

static

setFetchType()

setFetchType(boolean  $multiple) : static

Parameters

boolean $multiple

Returns

static

fetch()

fetch(boolean  $asArray = false) : array<mixed,\ManaPHP\Data\Model>|\ManaPHP\Data\Model|null|array|\ManaPHP\Data\Query\Row

Parameters

boolean $asArray

Returns

array<mixed,\ManaPHP\Data\Model>|\ManaPHP\Data\Model|null|array|\ManaPHP\Data\Query\Row

paginate()

paginate(integer  $size = null, integer  $page = null) : \ManaPHP\Data\Paginator

Parameters

integer $size
integer $page

Returns

\ManaPHP\Data\Paginator

forceUseMaster()

forceUseMaster(boolean  $forceUseMaster = true) : static

Parameters

boolean $forceUseMaster

Returns

static

first()

first() : array|null

Returns

array|null

get()

get() : array

Returns

array

all()

all() : array

Returns

array

value()

value(string  $field, mixed  $default = null) : mixed

Parameters

string $field

=key(get_object_vars(new Model))

mixed $default

Returns

mixed

sum()

sum(string  $field) : integer|float|null

Parameters

string $field

=key(get_object_vars(new Model))

Returns

integer|float|null

max()

max(string  $field) : integer|float|null

Parameters

string $field

=key(get_object_vars(new Model))

Returns

integer|float|null

min()

min(string  $field) : integer|float|null

Parameters

string $field

=key(get_object_vars(new Model))

Returns

integer|float|null

avg()

avg(string  $field) : float|null

Parameters

string $field

=key(get_object_vars(new Model))

Returns

float|null

options()

options(array  $options) : static

Parameters

array $options

Returns

static

when()

when(callable  $call) : static

Parameters

callable $call

Returns

static

whereDate()

whereDate(string  $field, string|integer  $date) : static

Parameters

string $field

=key(get_object_vars(new Model))

string|integer $date

Returns

static

whereMonth()

whereMonth(string  $field, string|integer  $date) : static

Parameters

string $field

=key(get_object_vars(new Model))

string|integer $date

Returns

static

whereYear()

whereYear(string  $field, string|integer  $date) : static

Parameters

string $field
string|integer $date

Returns

static

innerJoin()

innerJoin(string  $table, string  $condition = null, string  $alias = null) : static

Parameters

string $table
string $condition
string $alias

Returns

static

leftJoin()

leftJoin(string  $table, string  $condition = null, string  $alias = null) : static

Parameters

string $table
string $condition
string $alias

Returns

static

rightJoin()

rightJoin(string  $table, string  $condition = null, string  $alias = null) : static

Parameters

string $table
string $condition
string $alias

Returns

static

_createContext()

_createContext() : object

Returns

object