PHP Class PartKeepr\TipOfTheDayBundle\Services\TipOfTheDayService

Show file Open project: partkeepr/PartKeepr

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\ContainerInterface $container, EntityManager $entityManager, CronLoggerService $cronLoggerService, PartKeepr\RemoteFileLoader\RemoteFileLoaderFactory $remoteFileLoader )
syncTips ( ) Syncronizes the tip database against the master wiki.

Private Methods

Method Description
extractPageNames ( string $response ) : array Extracts the page names from the mediawiki JSON returned.
updateTipDatabase ( array $aPageNames ) Updates the tip database. Expects an array of page names.

Method Details

__construct() public method

public __construct ( Symfony\Component\DependencyInjection\ContainerInterface $container, EntityManager $entityManager, CronLoggerService $cronLoggerService, PartKeepr\RemoteFileLoader\RemoteFileLoaderFactory $remoteFileLoader )
$container Symfony\Component\DependencyInjection\ContainerInterface
$entityManager Doctrine\ORM\EntityManager
$cronLoggerService PartKeepr\CronLoggerBundle\Services\CronLoggerService
$remoteFileLoader PartKeepr\RemoteFileLoader\RemoteFileLoaderFactory

syncTips() public method

Syncronizes the tip database against the master wiki.
public syncTips ( )