コード例 #1
0
 public function testGetContextFromNamespace()
 {
     list($namespaceRoot, $servicePrefix, $serviceBundle) = BundleInspect::getContextFromNamespace(__NAMESPACE__);
     $this->assertSame('\\SR\\WonkaBundle', $namespaceRoot);
     $this->assertSame('wonka_bundle', $serviceBundle);
     $this->assertSame('sr', $servicePrefix);
 }
コード例 #2
0
ファイル: Extension.php プロジェクト: scr-be/wonka-bundle
 /**
  * @return string[]
  */
 protected function getNamespaceAndVendorAndBundleName()
 {
     $caller = get_class($this);
     list($namespace, $vendor, $bundle) = BundleInspect::getContextFromNamespace($caller);
     return [$namespace, $vendor, $bundle];
 }