/**
* @param IMapper $mapper
* @param IDependencyProvider $dependencyProvider
*/
public function __construct(IMapper $mapper, IDependencyProvider $dependencyProvider = NULL)
{
$this->mapper = $mapper;
$this->mapper->setRepository($this);
$this->identityMap = new IdentityMap($this, $dependencyProvider);
$this->dependencyProvider = $dependencyProvider;
$annotations = $this->reflection->getAnnotations();
if (isset($annotations['method'])) {
foreach ((array) $annotations['method'] as $annotation) {
$this->proxyMethods[strtolower(preg_replace('#^[^\\s]+\\s+(\\w+)\\(.*\\).*$#', '$1', $annotation))] = TRUE;
}
}
}