/** * @param FileLibrary $filelib */ public function attachTo(FileLibrary $filelib) { $this->fileRepository = $filelib->getFileRepository(); $this->profiles = $filelib->getProfileManager(); $this->storage = $filelib->getStorage(); $this->eventDispatcher = $filelib->getEventDispatcher(); }
/** * @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); }
public function attachTo(FileLibrary $filelib) { $this->eventDispatcher = $filelib->getEventDispatcher(); $this->adapter->attachTo($filelib); }
/** * @test */ public function getEventDispatcherShouldWork() { $ed = $this->getMockedEventDispatcher(); $filelib = new FileLibrary($this->getMockedStorageAdapter(), $this->getMockedBackendAdapter(), $ed); $this->assertSame($ed, $filelib->getEventDispatcher()); }
public function __construct(FileLibrary $filelib) { $this->filelib = $filelib; $this->eventDispatcher = $filelib->getEventDispatcher(); }