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