Documentation

Application

Table of Contents

Interfaces

RouterInterface
ResolvesToAny
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToArray
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToBinData
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToBool
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToDate
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToDecimal
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToDouble
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToInt
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToJavascript
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToLong
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToNull
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToNumber
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToObject
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToObjectId
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToRegex
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToString
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
ResolvesToTimestamp
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
AccumulatorInterface
Aggregation Pipeline Accumulators for $group stage.
DictionaryInterface
ExpressionInterface
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
FieldPathInterface
Aggregation expressions use field path to access fields in the input documents.
FieldQueryInterface
Query operators that need to be associated with a field path.
GeometryInterface
OperatorExpressionInterface
Expressions can include field paths, literals, system variables, expression objects, and expression operators.
OperatorInterface
Marker interface for MongoDB operators.
QueryInterface
Query are operator and object that can be used in $match stage.
SearchOperatorInterface
StageInterface
Aggregation Pipeline Stages
SwitchBranchInterface
Interface for branches in $switch operators
WindowInterface
Window Operators can be used for $setWindowFields stage partition.
Codec
The Codec interface allows decoding BSON data to native PHP types and back to BSON.
Decoder
DocumentCodec
The DocumentCodec interface allows decoding BSON document data to native PHP objects and back to BSON documents.
Encoder
Exception
LoggerAwareInterface
Describes a logger-aware instance.
LoggerInterface
Describes a logger instance.

Classes

DataValidator
Filesystem
FileUploader
Image
Api
CompanyPlant
Currency
DataPoint
FactEsg
Kpi
Location
Time
Unit
Router
Config
Dice
Database
Encryption
Request
Response
Session
Page
Partial
Renderer
Section
Csrf
Escaper
Xss
MultilangRouter
A Multilingual Router
Router
Class Router.
ComposerAutoloaderInit7cb8c644d6aa2f1bbe14f2afa2e7e96d
ComposerStaticInit7cb8c644d6aa2f1bbe14f2afa2e7e96d
ClassLoader
ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
InstalledVersions
This class is copied in every Composer installed project and available to all
Accumulator
Factories for Aggregation Pipeline Accumulator and Window Operators
BuilderEncoder
ArrayFieldPath
BinDataFieldPath
BoolFieldPath
DateFieldPath
DecimalFieldPath
DoubleFieldPath
FieldPath
IntFieldPath
JavascriptFieldPath
LongFieldPath
NullFieldPath
NumberFieldPath
ObjectFieldPath
ObjectIdFieldPath
RegexFieldPath
StringFieldPath
TimestampFieldPath
Variable
Expression
Factories for Aggregation Pipeline Expression Operators
Pipeline
An aggregation pipeline consists of one or more stages that process documents.
Query
Factories for Query Operators
Search
Stage
OutputWindow
Specifies the window boundaries and parameters. Window boundaries are inclusive.
QueryObject
Helper class to validate query objects.
Variable
Enum for system variables that can be used in aggregation expressions.
BulkWriteResult
Result class for a bulk write operation.
ChangeStream
Iterator for a change stream.
Client
ClientBulkWrite
Collection
Database
DeleteResult
Result class for a delete operation.
BadMethodCallException
InvalidArgumentException
ResumeTokenException
RuntimeException
SearchNotSupportedException
UnexpectedValueException
UnsupportedException
UnsupportedValueException
Bucket
Bucket provides a public API for interacting with the GridFS files and chunks collections.
CorruptFileException
FileNotFoundException
LogicException
StreamException
InsertManyResult
Result class for a multi-document insert operation.
InsertOneResult
Result class for a single-document insert operation.
BSONArray
Model class for a BSON array.
BSONDocument
Model class for a BSON document.
BSONIterator
Iterator for BSON documents.
CodecCursor
CollectionInfo
Collection information model class.
DatabaseInfo
Database information model class.
IndexInfo
Index information model class.
Aggregate
Operation for the aggregate command.
BulkWrite
Operation for executing multiple write operations.
ClientBulkWriteCommand
Operation for executing multiple write operations via the bulkWrite command.
Count
Operation for the count command.
CountDocuments
Operation for obtaining an exact count of documents in a collection
CreateCollection
Operation for the create command.
CreateIndexes
Operation for the createIndexes command.
CreateSearchIndexes
Operation for the createIndexes command.
DatabaseCommand
Operation for executing a database command.
DeleteMany
Operation for deleting multiple document with the delete command.
DeleteOne
Operation for deleting a single document with the delete command.
Distinct
Operation for the distinct command.
DropCollection
Operation for the drop command.
DropDatabase
Operation for the dropDatabase command.
DropIndexes
Operation for the dropIndexes command.
DropSearchIndex
Operation for the dropSearchIndexes command.
EstimatedDocumentCount
Operation for obtaining an estimated count of documents in a collection
Explain
Operation for the explain command.
Find
Operation for the find command.
FindOne
Operation for finding a single document with the find command.
FindOneAndDelete
Operation for deleting a document with the findAndModify command.
FindOneAndReplace
Operation for replacing a document with the findAndModify command.
FindOneAndUpdate
Operation for updating a document with the findAndModify command.
InsertMany
Operation for inserting multiple documents with the insert command.
InsertOne
Operation for inserting a single document with the insert command.
ListCollectionNames
Operation for the listCollectionNames helper.
ListCollections
Operation for the listCollections command.
ListDatabaseNames
Operation for the ListDatabases command, returning only database names.
ListDatabases
Operation for the ListDatabases command.
ListIndexes
Operation for the listIndexes command.
ListSearchIndexes
Operation for the listSearchIndexes command.
ModifyCollection
Operation for the collMod command.
RenameCollection
Operation for the renameCollection command.
ReplaceOne
Operation for replacing a single document with the update command.
UpdateMany
Operation for updating multiple documents with the update command.
UpdateOne
Operation for updating a single document with the update command.
UpdateSearchIndex
Operation for the createIndexes command.
Watch
Operation for creating a change stream with the aggregate command.
UpdateResult
Result class for an update operation.
AbstractLogger
This is a simple Logger implementation that other Loggers can inherit from.
InvalidArgumentException
LogLevel
Describes log levels.
NullLogger
This Logger can be used to avoid conditional log calls.
DelayedTargetValidation
FilterException
FilterFailedException
NoDiscard

Traits

FluentFactoryTrait
DecodeIfSupported
EncodeIfSupported
LoggerAwareTrait
Basic Implementation of LoggerAwareInterface.
LoggerTrait
This is a simple Logger trait that classes unable to extend AbstractLogger (because they extend another class, etc) can include.

Enums

Sort
Sort order can be used with $sort stage and sortBy properties
TimeUnit
Values for "unit" property of stages like $derivative and $integral, and operators like $dateAdd and $dateDiff

Functions

add_logger()  : void
Registers a PSR-3 logger to receive log messages from the driver/library.
remove_logger()  : void
Unregisters a PSR-3 logger.
object()  : stdClass
Create a new stdClass instance with the provided properties.
with_transaction()  : void
Execute a callback within a transaction in the given session
get_error_handler()  : callable|null
get_exception_handler()  : callable|null
array_first()  : mixed
array_last()  : mixed
locale_is_right_to_left()  : bool
grapheme_levenshtein()  : mixed
grapheme_levenshtein()  : int|false

Functions

add_logger()

Registers a PSR-3 logger to receive log messages from the driver/library.

add_logger(LoggerInterface $logger) : void

Calling this method again with a logger that has already been added will have no effect.

Parameters
$logger : LoggerInterface

remove_logger()

Unregisters a PSR-3 logger.

remove_logger(LoggerInterface $logger) : void

Calling this method with a logger that has not been added will have no effect.

Parameters
$logger : LoggerInterface

object()

Create a new stdClass instance with the provided properties.

object(mixed ...$values) : stdClass

Use named arguments to specify the property names. object( property1: value1, property2: value2 )

If property names contain a dot or a dollar characters, use array unpacking syntax. object( ...[ 'author.name' => 1, 'array.$' => 1 ] )

Parameters
$values : mixed
Tags
psalm-suppress

MoreSpecificReturnType

psalm-suppress

LessSpecificReturnStatement

Return values
stdClass

with_transaction()

Execute a callback within a transaction in the given session

with_transaction(Session $session, callable $callback[, array<string|int, mixed> $transactionOptions = [] ]) : void

This helper takes care of retrying the commit operation or the entire transaction if an error occurs.

If the commit fails because of an UnknownTransactionCommitResult error, the commit is retried without re-invoking the callback. If the commit fails because of a TransientTransactionError, the entire transaction will be retried. In this case, the callback will be invoked again. It is important that the logic inside the callback is idempotent.

In case of failures, the commit or transaction are retried until 120 seconds from the initial call have elapsed. After that, no retries will happen and the helper will throw the last exception received from the driver.

Parameters
$session : Session

A session object as retrieved by Client::startSession

$callback : callable

A callback that will be invoked within the transaction

$transactionOptions : array<string|int, mixed> = []

Additional options that are passed to Session::startTransaction

Tags
see
Client::startSession()
see
Session::startTransaction()

for supported transaction options

throws
RuntimeException

for driver errors while committing the transaction

throws
Exception

for any other errors, including those thrown in the callback

get_error_handler()

get_error_handler() : callable|null
Return values
callable|null

get_exception_handler()

get_exception_handler() : callable|null
Return values
callable|null

array_first()

array_first(array<string|int, mixed> $array) : mixed
Parameters
$array : array<string|int, mixed>

array_last()

array_last(array<string|int, mixed> $array) : mixed
Parameters
$array : array<string|int, mixed>

locale_is_right_to_left()

locale_is_right_to_left(string $locale) : bool
Parameters
$locale : string
Return values
bool

grapheme_levenshtein()

grapheme_levenshtein(string $string1, string $string2[, int $insertion_cost = 1 ][, int $replacement_cost = 1 ][, int $deletion_cost = 1 ][, string $locale = '' ]) : mixed
Parameters
$string1 : string
$string2 : string
$insertion_cost : int = 1
$replacement_cost : int = 1
$deletion_cost : int = 1
$locale : string = ''

grapheme_levenshtein()

grapheme_levenshtein(string $string1, string $string2[, int $insertion_cost = 1 ][, int $replacement_cost = 1 ][, int $deletion_cost = 1 ][, string $locale = '' ]) : int|false
Parameters
$string1 : string
$string2 : string
$insertion_cost : int = 1
$replacement_cost : int = 1
$deletion_cost : int = 1
$locale : string = ''
Return values
int|false

        
On this page

Search results