Overview

Namespaces

  • NGS
    • Client
      • Exception
    • Converter
    • Patterns
  • PHP

Classes

  • AggregateDomainEvent
  • AggregateRoot
  • CubeBuilder
  • DomainEvent
  • GenericSearch
  • Identifiable
  • OlapCube
  • Repository
  • Search
  • Searchable
  • SearchBuilder
  • Snapshot
  • Specification
  • Templater

Interfaces

  • IDomainObject
  • IIdentifiable
  • Overview
  • Namespace
  • Class
  • Tree

Class Specification

Search predicate which can be used to filter domain objects from the remote server.

Specification is defined in DSL with keyword specification and a predicate. Server can convert specification to SQL query on the fly or call database function created at compile time. Other optimization techniques can be used too.

DSL example:

module Todo {
  aggregate Task {
    timestamp createdOn;
    specification findBetween
      'it => it.createdOn >= after && it.createdOn <= before' {
        date after;
        date before;
    }
  }
}
NGS\Patterns\Specification implements NGS\Patterns\IDomainObject
Abstract
Namespace: NGS\Patterns
Located at Patterns/Specification.php
Methods summary
public array
# search( type $limit = null, type $offset = null, array $order = null )

Search domain object using conditions in specification

Search domain object using conditions in specification

Parameters

$limit
type
$limit
$offset
type
$offset
$order
array
$order

Returns

array
Array of found objects, or empty array if none found
public type
# count( )

Count domain object using conditions in specification

Count domain object using conditions in specification

Returns

type
public NGS\Patterns\SearchBuilder
# builder( )

Creates an instance of SearchBuilder from specification.

Creates an instance of SearchBuilder from specification.

Returns

NGS\Patterns\SearchBuilder

See

NGS\Patterns\SearchBuilder
Methods inherited from NGS\Patterns\IDomainObject
toArray(), toJson()
API documentation generated by ApiGen 2.8.0