Exemplo n.º 1
0
 /**
  * @param FileLibrary $filelib
  */
 public function attachTo(FileLibrary $filelib)
 {
     $this->fileRepository = $filelib->getFileRepository();
     $this->profiles = $filelib->getProfileManager();
     $this->eventDispatcher = $filelib->getEventDispatcher();
     $this->eventDispatcher->addSubscriber($this);
     $this->adapter->attachTo($filelib);
     $this->linker->attachTo($filelib);
 }
Exemplo n.º 2
0
 public function attachTo(FileLibrary $filelib)
 {
     $this->eventDispatcher = $filelib->getEventDispatcher();
     $this->adapter->attachTo($filelib);
 }
 /**
  * @test
  */
 public function doesntThrowUpWhenRightClassIsExpected()
 {
     $filelib = new FileLibrary(new MemoryStorageAdapter(), new MemoryBackendAdapter());
     $resolvee = function () use($filelib) {
         $p = $this->getMockedPublisher();
         $p->expects($this->once())->method('attachTo')->with($filelib);
         return $p;
     };
     $resolver = new LazyReferenceResolver($resolvee, 'Xi\\Filelib\\Publisher\\Publisher');
     $resolver->attachTo($filelib);
     $resolver->resolve();
 }
Exemplo n.º 4
0
 /**
  * @param FileLibrary $filelib
  */
 public function attachTo(FileLibrary $filelib)
 {
     $this->actualAdapter->attachTo($filelib);
     $this->cacheAdapter->attachTo($filelib);
 }