PHP 클래스 lithium\data\source\mongo_db\Exporter

상속: extends lithium\core\StaticObject
파일 보기 프로젝트 열기: unionofrad/lithium 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_classes
$_commands

공개 메소드들

메소드 설명
get ( $type, $export, array $options = [] )
toCommand ( $changes )

보호된 메소드들

메소드 설명
_append ( array $changes, string $key, mixed $value, string $change ) : array Handles appending nested objects to document changesets.
_create ( $export, array $options )
_diff ( array $left, array $right ) : array Handle diffing operations between Document object states. Implemented because all of PHP's array comparison functions are broken when working with objects.
_update ( array $export ) : array Calculates changesets for update operations, and produces an array which can be converted to a set of native MongoDB update operations.

메소드 상세

_append() 보호된 정적인 메소드

Handles appending nested objects to document changesets.
protected static _append ( array $changes, string $key, mixed $value, string $change ) : array
$changes array The full set of changes to be made to the database.
$key string The key of the field to append, which may be a dot-separated path if the value is or is contained within a nested object.
$value mixed The value to append to the changeset. Can be a scalar value, array, a nested object, or part of a nested object.
$change string The type of change, as to whether update/remove or rename etc.
리턴 array Returns the value of `$changes`, with any new changed values appended.

_create() 보호된 정적인 메소드

protected static _create ( $export, array $options )
$options array

_diff() 보호된 정적인 메소드

Handle diffing operations between Document object states. Implemented because all of PHP's array comparison functions are broken when working with objects.
protected static _diff ( array $left, array $right ) : array
$left array The left-hand comparison array.
$right array The right-hand comparison array.
리턴 array Returns an array of the differences of `$left` compared to `$right`.

_update() 보호된 정적인 메소드

Calculates changesets for update operations, and produces an array which can be converted to a set of native MongoDB update operations.
protected static _update ( array $export ) : array
$export array An array of fields exported from a call to `Document::export()`, and should contain the following keys: - `'data'` _array_: An array representing the original data loaded from the database for the document. - `'update'` _array_: An array representing the current state of the document, containing any modifications made. - `'key'` _string_: If this is a nested document, this is a dot-separated path from the root-level document.
리턴 array Returns an array representing the changes to be made to the document. These are converted to database-native commands by the `toCommand()` method.

get() 공개 정적인 메소드

public static get ( $type, $export, array $options = [] )
$options array

toCommand() 공개 정적인 메소드

public static toCommand ( $changes )

프로퍼티 상세

$_classes 보호되어 있는 정적으로 프로퍼티

protected static $_classes

$_commands 보호되어 있는 정적으로 프로퍼티

protected static $_commands