Property | Type | Description | |
---|---|---|---|
$cache | Doctrine\Common\Cache\Cache | ||
$connection | Pagekit\Database\Connection | ||
$events | Pagekit\Event\EventDispatcherInterface | ||
$loader | Pagekit\Database\ORM\Loader\LoaderInterface | ||
$metadata | Pagekit\Database\ORM\Metadata[] | ||
$prefix | string | The cache prefix |
Method | Description | |
---|---|---|
__construct ( Pagekit\Database\Connection $connection, Pagekit\Event\EventDispatcherInterface $events ) | Constructor. | |
get ( object | string $class ) : Pagekit\Database\ORM\Metadata | Gets the metadata for the given class. | |
getCache ( ) : Doctrine\Common\Cache\Cache | Gets the cache used for caching Metadata objects. | |
getConnection ( ) : Pagekit\Database\Connection | Gets the database connection. | |
has ( string $class ) : boolean | Checks if the metadata for a class is already loaded. | |
setCache ( Doctrine\Common\Cache\Cache $cache ) | Sets the cache used for caching Metadata objects. | |
setLoader ( Pagekit\Database\ORM\Loader\LoaderInterface $loader ) | Sets the loader object used by the factory to create Metadata objects. |
Method | Description | |
---|---|---|
getParentClasses ( ReflectionClass $class ) : array | Get array of parent classes for the given class. | |
load ( ReflectionClass $class ) : Pagekit\Database\ORM\Metadata | Loads the metadata of the given class. | |
subscribe ( Pagekit\Database\ORM\Metadata $metadata ) | Subscribes model lifecycle callbacks. |
public __construct ( Pagekit\Database\Connection $connection, Pagekit\Event\EventDispatcherInterface $events ) | ||
$connection | Pagekit\Database\Connection | |
$events | Pagekit\Event\EventDispatcherInterface |
public getCache ( ) : Doctrine\Common\Cache\Cache | ||
return | Doctrine\Common\Cache\Cache |
public getConnection ( ) : Pagekit\Database\Connection | ||
return | Pagekit\Database\Connection |
protected getParentClasses ( ReflectionClass $class ) : array | ||
$class | ReflectionClass | |
return | array |
protected load ( ReflectionClass $class ) : Pagekit\Database\ORM\Metadata | ||
$class | ReflectionClass | |
return | Pagekit\Database\ORM\Metadata |
public setCache ( Doctrine\Common\Cache\Cache $cache ) | ||
$cache | Doctrine\Common\Cache\Cache |
public setLoader ( Pagekit\Database\ORM\Loader\LoaderInterface $loader ) | ||
$loader | Pagekit\Database\ORM\Loader\LoaderInterface |
protected subscribe ( Pagekit\Database\ORM\Metadata $metadata ) | ||
$metadata | Pagekit\Database\ORM\Metadata |
protected Cache,Doctrine\Common\Cache $cache | ||
return | Doctrine\Common\Cache\Cache |
protected Connection,Pagekit\Database $connection | ||
return | Pagekit\Database\Connection |
protected EventDispatcherInterface,Pagekit\Event $events | ||
return | Pagekit\Event\EventDispatcherInterface |
protected LoaderInterface,Pagekit\Database\ORM\Loader $loader | ||
return | Pagekit\Database\ORM\Loader\LoaderInterface |
protected Metadata[],Pagekit\Database\ORM $metadata | ||
return | Pagekit\Database\ORM\Metadata[] |