예제 #1
0
 /**
  * @param string $version
  * @return bool|array
  */
 public function update($version)
 {
     $this->createMyForm();
     $this->createMyEvents();
     $documentInstaller = new DocumentInstaller($this);
     $documentInstaller->installDocuments();
     $tableInstaller = new AdditionalTableInstaller($this);
     $tableInstaller->installAdditionalDatabaseTable();
     if ($version == '1.0.0') {
         $this->createMyAttributes();
     }
     return array('success' => true, 'invalidateCache' => $this->getInvalidateCacheArray());
 }
 /**
  * @param string $version
  * @return array
  * @throws Exception
  */
 public function update($version)
 {
     // Check if PHP version matches
     if (version_compare(phpversion(), '5.4', '<')) {
         throw new Exception("This plugin requires PHP 5.4 or a later version");
     }
     $this->createMyForm();
     $this->createMyEvents();
     $documentInstaller = new DocumentInstaller($this->get('db'));
     $documentInstaller->installDocuments();
     $tableInstaller = new AdditionalTableInstaller($this->get('db'));
     $tableInstaller->installAdditionalDatabaseTable();
     return array('success' => true, 'invalidateCache' => $this->getInvalidateCacheArray());
 }