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
 1: <?php
 2: namespace NGS\Patterns;
 3: 
 4: require_once(__DIR__.'/IDomainObject.php');
 5: require_once(__DIR__.'/Specification.php');
 6: require_once(__DIR__.'/../Client/DomainProxy.php');
 7: 
 8: use NGS\Client\DomainProxy;
 9: 
10: abstract class Searchable implements IDomainObject
11: {
12:     public static function findAll($limit = null, $offset = null)
13:     {
14:         return DomainProxy::instance()->search(get_called_class(), $limit, $offset);
15:     }
16: 
17:     public static function count(Specification $specification = null)
18:     {
19:         return $specification === null
20:             ? DomainProxy::instance()->count(get_called_class())
21:             : $specification->count();
22:     }
23: }
24: 
API documentation generated by ApiGen 2.8.0