/** * Check a given year for leap year. * * @param integer|array|IfwPsn_Vendor_Zend_Date $year Year to check * @return boolean */ public static function checkLeapYear($year) { if ($year instanceof IfwPsn_Vendor_Zend_Date) { $year = (int) $year->toString(self::YEAR, 'iso'); } if (is_array($year)) { if (isset($year['year']) === true) { $year = $year['year']; } else { require_once IFW_PSN_LIB_ROOT . 'IfwPsn/Vendor/Zend/Date/Exception.php'; throw new IfwPsn_Vendor_Zend_Date_Exception("no year given in array"); } } if (!is_numeric($year)) { require_once IFW_PSN_LIB_ROOT . 'IfwPsn/Vendor/Zend/Date/Exception.php'; throw new IfwPsn_Vendor_Zend_Date_Exception("year ({$year}) has to be integer for checkLeapYear()", 0, null, $year); } return (bool) parent::isYearLeapYear($year); }
/** * Internal method to check if the given cache supports tags * * @param IfwPsn_Vendor_Zend_Cache $cache */ protected static function _getTagSupportForCache() { $backend = self::$_cache->getBackend(); if ($backend instanceof IfwPsn_Vendor_Zend_Cache_Backend_ExtendedInterface) { $cacheOptions = $backend->getCapabilities(); self::$_cacheTags = $cacheOptions['tags']; } else { self::$_cacheTags = false; } return self::$_cacheTags; }