MetaIssue::__construct PHP Method

__construct() public method

public __construct ( $p_publicationId = null, $p_languageId = null, $p_issueNumber = null )
    public function __construct($p_publicationId = null, $p_languageId = null, $p_issueNumber = null)
    {
        $this->m_properties = self::$m_baseProperties;
        $this->m_customProperties = self::$m_defaultCustomProperties;
        $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
        $cacheKey = $cacheService->getCacheKey(array('issue', $p_publicationId, $p_languageId, $p_issueNumber), 'issue');
        if ($cacheService->contains($cacheKey)) {
            $this->m_dbObject = $cacheService->fetch($cacheKey);
        } else {
            $this->m_dbObject = new Issue($p_publicationId, $p_languageId, $p_issueNumber);
            $cacheService->save($cacheKey, $this->m_dbObject);
        }
        if (!$this->m_dbObject->exists()) {
            $this->m_dbObject = new Issue();
        }
    }