Exemple #1
0
 /**
  * (non-PHPdoc)
  * @see \Mergy\Util\Cacheable::get()
  */
 public function get()
 {
     parent::get();
     $oInfo = simplexml_load_string($this->_mCache);
     if ($oInfo instanceof \SimpleXMLElement) {
         return $oInfo->logentry;
     }
     throw new \Mergy\Revision\Aggregator\Exception(\Mergy\Revision\Aggregator\Exception::ERROR);
 }
Exemple #2
0
 /**
  * (non-PHPdoc)
  * @see \Mergy\Util\Cacheable::get()
  */
 public function get()
 {
     parent::get();
     $oFiles = simplexml_load_string($this->_mCache);
     if ($oFiles instanceof \SimpleXMLElement) {
         $aFiles = array();
         foreach ($oFiles->paths->children() as $oPath) {
             $oAttributes = $oPath->attributes();
             $sPath = (string) $oPath;
             if (strlen($sPath) > 0 and isset($oAttributes->kind) === true and (string) $oAttributes->kind === 'file') {
                 $aFiles[] = array('type' => (string) $oAttributes->item, 'path' => (string) $sPath);
             }
             unset($sPath, $oAttributes);
         }
         return $aFiles;
     }
     throw new \Mergy\Revision\Aggregator\Exception(\Mergy\Revision\Aggregator\Exception::ERROR);
 }