示例#1
0
 /**
  * Convert a cog:// reference to a real path
  *
  * @param $ref
  * @return mixed
  */
 private function _getPathFromRef($ref)
 {
     $handler = StreamWrapperManager::getHandler(self::COG_PREFIX);
     return $handler->getLocalPath($ref, self::COG_PREFIX);
 }
 /**
  * Get path of barcode image
  *
  * @param $filename
  *
  * @return string
  */
 public function getPath($filename)
 {
     $path = $this->getDirectory() . '/' . $filename;
     $handler = StreamWrapperManager::getHandler(File::COG_PREFIX);
     return $handler->getLocalPath($path, File::COG_PREFIX);
 }
 /**
  * @expectedException \Exception
  */
 public function testGettingNonexistantPrefix()
 {
     StreamWrapperManager::getHandler('thisdoesntexist');
 }