예제 #1
0
 function assignMockStorageFactory($storage)
 {
     $storageFactory = new Mock_binarypool_storagefactory();
     $storageFactory->setReturnValue('getStorage', $storage);
     binarypool_views::$storageFactory = $storageFactory;
 }
예제 #2
0
파일: views.php 프로젝트: pneff/binarypool
 private static function getStorage($bucket)
 {
     if (!self::$storageFactory) {
         self::$storageFactory = new binarypool_storagefactory();
     }
     return self::$storageFactory->getStorage($bucket);
 }