Пример #1
0
 /**
  * @param string $format
  *
  * @return string
  */
 public function getResourceLocation($format = 'bundle')
 {
     $reflection = new \ReflectionClass(get_class($this));
     $namespace = $reflection->getNamespaceName();
     switch ($format) {
         case 'bundle':
             return Parser::getBundleClass($namespace);
             break;
         case 'namespace':
             return $namespace;
             break;
     }
 }
Пример #2
0
 /**
  * @param string $bundle
  * @param string $filepath
  *
  * @return string
  */
 public static function getFilePath($bundle, $filepath)
 {
     $bundleclass = Parser::getBundleClass($bundle);
     $reflection = new \ReflectionClass($bundleclass);
     return dirname($reflection->getFileName()) . '/' . $filepath;
 }