示例#1
0
 /**
  * @group ZF-7350
  */
 public function testPrefixesEndingInBackslashDenoteNamespacedClasses()
 {
     $loader = new PluginLoader(array());
     $loader->addPrefixPath('Zfns\\', dirname(__FILE__) . '/_files/Zfns');
     try {
         $className = $loader->load('Foo');
     } catch (Exception $e) {
         $paths = $loader->getPaths();
         $this->fail(sprintf("Failed loading helper; paths: %s", var_export($paths, 1)));
     }
     $this->assertEquals('Zfns\\Foo', $className);
     $this->assertEquals('Zfns\\Foo', $loader->getClassName('Foo'));
 }
示例#2
0
文件: Serializer.php 项目: stunti/zf2
 /**
  * Returns a default adapter plugin loader
  *
  * @return Zend\Loader\PluginLoader\PluginLoader
  */
 protected static function _getDefaultAdapterLoader()
 {
     $loader = new PluginLoader\PluginLoader();
     $loader->addPrefixPath('Zend\\Serializer\\Adapter\\', __DIR__ . '/Serializer/Adapter');
     return $loader;
 }