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 CubeBuilder

Helper for createing and analyizing OLAP cubes

Example:

$builder = new CubeBuilder('My\Cube');
$rows = $builder->dimension('money')
                ->facts('total', 'average')
                ->descending('average')
                ->analyze();
Namespace: NGS\Patterns
Located at Patterns/CubeBuilder.php
Methods summary
public
# __construct( NGS\Patterns\OlapCube $cube )

Create new builder on cube

Create new builder on cube

Parameters

$cube
NGS\Patterns\OlapCube
$cube
public mixed
# dimension( mixed $dimension )

Add single dimension to cube

Add single dimension to cube

Parameters

$dimension
mixed
$dimension A valid dimension

Returns

mixed
$this

Throws

InvalidArgumentException
Invalid type or not a valid dimension for given cube
public mixed
# dimensions( array $dimensions )

Add multiple dimensions to cube

Add multiple dimensions to cube

Parameters

$dimensions
array
$dimensions

Returns

mixed
$this
public mixed
# fact( mixed $fact )

Add single fact to cube

Add single fact to cube

Parameters

$fact
mixed
$fact string A valid fact

Returns

mixed
$this

Throws

InvalidArgumentException
Invalid type or not a valid fact for given cube
public mixed
# facts( array $facts )

Add multiple facts to cube

Add multiple facts to cube

Parameters

$facts
mixed
$fact array Valid facts

Returns

mixed
$this

Throws

InvalidArgumentException
Invalid type or not a valid fact for given cube
public mixed
# add( mixed $dimensionOrFact )

Adds single dimension or facts to cube

Adds single dimension or facts to cube

Parameters

$dimensionOrFact
mixed
$dimensionOrFact string A valid dimension or fact

Returns

mixed
$this

Throws

InvalidArgumentException
Invalid type or not a valid fact or dimension for given cube
public mixed
# ascending( mixed $dimensionOrFact )

Order ascending by dimension or fact

Order ascending by dimension or fact

Parameters

$dimensionOrFact
mixed
$dimensionOrFact string A valid dimension or fact

Returns

mixed
$this
public
# asc( mixed $dimensionOrFact )

See

NGS\Patterns\CubeBuilder::ascending()
public mixed
# descending( mixed $dimensionOrFact )

Order descending by dimension or fact

Order descending by dimension or fact

Parameters

$dimensionOrFact
mixed
$dimensionOrFact string A valid dimension or fact

Returns

mixed
$this
public
# desc( mixed $dimensionOrFact )

See

NGS\Patterns\CubeBuilder::descending()
public mixed
# with( NGS\Patterns\Specification $specification )

Use specification in cube analysis

Use specification in cube analysis

Parameters

$specification
NGS\Patterns\Specification

Returns

mixed
$this
public array
# analyze( )

Execute cube analysis with builder settings

Execute cube analysis with builder settings

Returns

array
Resulting rows
Properties summary
protected mixed $cube
#
protected array $dimensions array()
#
protected array $facts array()
#
protected array $order array()
#
protected mixed $specification
#
API documentation generated by ApiGen 2.8.0