/** * @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); }