PHP Class Bolt\Storage\EventProcessor\TimedRecord

Author: Gawain Lynch ([email protected])
Exibir arquivo Open project: bolt/bolt Class Usage Examples

Protected Properties

Property Type Description
$cache Doctrine\Common\Cache\CacheProvider
$contentTypeNames array
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$em Bolt\Storage\EntityManagerInterface
$interval integer
$systemLogger Psr\Log\LoggerInterface

Public Methods

Method Description
__construct ( array $contentTypeNames, Bolt\Storage\EntityManagerInterface $em, CacheProvider $cache, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Psr\Log\LoggerInterface $systemLogger, integer $interval ) Constructor.
holdExpiredRecords ( ) Check (and update) any records that need to be updated from "published" to "held".
isDueHold ( ) Get the timer for publishing timed records
isDuePublish ( ) Get the timer for publishing timed records
publishTimedRecords ( ) Check (and update) any records that need to be updated from "timed" to "published".

Private Methods

Method Description
dispatch ( Content $content, string $type, string $legacyType ) Dispatch the update event.
getHoldQuery ( Doctrine\DBAL\Query\QueryBuilder $query ) Set the QueryBuilder where parameters.
getTimedPublishQuery ( Doctrine\DBAL\Query\QueryBuilder $query ) Set the QueryBuilder where parameters.
getTimedRecords ( ContentRepository $contentRepo, string $type ) : Content[] | false Set the QueryBuilder where parameters.
save ( ContentRepository $contentRepo, Content $content, string $type, string $legacyType ) Save a modified entity.
timedHandleRecords ( string $contentTypeName, string $type ) Handle any pending timed publish/hold transitions.

Method Details

__construct() public method

Constructor.
public __construct ( array $contentTypeNames, Bolt\Storage\EntityManagerInterface $em, CacheProvider $cache, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Psr\Log\LoggerInterface $systemLogger, integer $interval )
$contentTypeNames array
$em Bolt\Storage\EntityManagerInterface
$cache Doctrine\Common\Cache\CacheProvider
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$systemLogger Psr\Log\LoggerInterface
$interval integer

holdExpiredRecords() public method

Check (and update) any records that need to be updated from "published" to "held".
public holdExpiredRecords ( )

isDueHold() public method

Get the timer for publishing timed records
public isDueHold ( )

isDuePublish() public method

Get the timer for publishing timed records
public isDuePublish ( )

publishTimedRecords() public method

Check (and update) any records that need to be updated from "timed" to "published".
public publishTimedRecords ( )

Property Details

$cache protected_oe property

protected CacheProvider,Doctrine\Common\Cache $cache
return Doctrine\Common\Cache\CacheProvider

$contentTypeNames protected_oe property

protected array $contentTypeNames
return array

$dispatcher protected_oe property

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $dispatcher
return Symfony\Component\EventDispatcher\EventDispatcherInterface

$em protected_oe property

protected EntityManagerInterface,Bolt\Storage $em
return Bolt\Storage\EntityManagerInterface

$interval protected_oe property

protected int $interval
return integer

$systemLogger protected_oe property

protected LoggerInterface,Psr\Log $systemLogger
return Psr\Log\LoggerInterface