Overview

Namespaces

  • PommProject
    • Cli
      • Command
      • Exception
    • Foundation
      • Client
      • Converter
        • Geometry
        • Type
      • Exception
      • Inspector
      • Listener
      • Observer
      • PreparedQuery
      • QueryManager
      • Session
      • Tester
    • ModelManager
      • Converter
      • Exception
      • Generator
      • Model
        • FlexibleEntity
        • ModelTrait
      • ModelLayer
      • Tester

Classes

  • CollectionIterator
  • FlexibleEntity
  • HydrationPlan
  • IdentityMapper
  • Model
  • ModelPooler
  • Projection
  • RowStructure
  • Overview
  • Namespace
  • Class

Class IdentityMapper

IdentityMapper

Cache for FlexibleEntityInterface instances to ensure there are no different instances for the same data.

Namespace: PommProject\ModelManager\Model
Package: ModelManager
Copyright: 2014 - 2015 Grégoire HUBERT
Author: Grégoire HUBERT
License: {@link http://opensource.org/licenses/mit-license.php}
Located at Model/IdentityMapper.php
Methods summary
public static string
# getSignature( PommProject\ModelManager\Model\FlexibleEntity\FlexibleEntityInterface $entity, array $primary_key )

getSignature

getSignature

Compute a unique signature upon entity's values in its primary key. If an empty primary key is provided, null is returned.

Parameters

$entity
$primary_key

Returns

string
public PommProject\ModelManager\Model\FlexibleEntity\FlexibleEntityInterface
# fetch( PommProject\ModelManager\Model\FlexibleEntity\FlexibleEntityInterface $entity, array $primary_key )

fetch

fetch

Pool FlexibleEntityInterface instances and update them if necessary.

Parameters

$entity
$primary_key

Returns

PommProject\ModelManager\Model\FlexibleEntity\FlexibleEntityInterface
public PommProject\ModelManager\Model\IdentityMapper
# clear( )

clear

clear

Flush instances from the identity mapper.

Returns

PommProject\ModelManager\Model\IdentityMapper
$this
Properties summary
protected PommProject\ModelManager\Model\FlexibleEntity\FlexibleEntityInterface[] $instances
# []
API documentation generated by ApiGen