Example #1
0
 protected function _getPropertyWhen($sProperty, $iTimestamp, $bExact = false)
 {
     switch ($sProperty) {
         case 'path':
             $sSrc = parent::_getPropertyWhen('src', $iTimestamp, $bExact);
             return substr($sSrc, 0, 4) == 'http' ? $sSrc : '/' . str_replace(ROOT, '', dirname(DATA_PATH)) . '/' . $sSrc;
             break;
         case 'gallery':
             $aGallery = array();
             $aGalleryOrder = parent::_getPropertyWhen('gallery_order', $iTimestamp, $bExact);
             if (is_array($aGalleryOrder) && sizeof($aGalleryOrder)) {
                 foreach ($aGalleryOrder as $sKey) {
                     $sPropertyName = 'gal_' . $sKey;
                     $sPropertyValue = parent::_getPropertyWhen($sPropertyName, $iTimestamp, $bExact);
                     if (!is_null($sPropertyValue)) {
                         $aGallery[] = $sPropertyValue;
                     }
                 }
             }
             return $aGallery;
             break;
         default:
             return parent::_getPropertyWhen($sProperty, $iTimestamp, $bExact);
             break;
     }
 }
Example #2
0
 protected function _getPropertyWhen($sProperty, $iTimestamp, $bExact = false)
 {
     switch ($sProperty) {
         case 'target':
             $sTarget = parent::_getPropertyWhen('target', $iTimestamp, $bExact);
             return implode(', ', $sTarget);
             break;
         default:
             return parent::_getPropertyWhen($sProperty, $iTimestamp, $bExact);
             break;
     }
 }