예제 #1
0
 /**
  * Update system table schema
  *
  * @param string $sql
  * @param string $type Schema type: `core` or <module>, default as SqlSchema::getType()
  *
  * @return bool
  */
 protected function querySchema($sql, $type = '')
 {
     $sqlHandler = new SqlSchema();
     try {
         $sqlHandler->queryContent($sql, $type);
     } catch (\Exception $exception) {
         $this->handler->setResult('db', array('status' => false, 'message' => 'SQL schema query failed: ' . $exception->getMessage()));
         return false;
     }
     return true;
 }
예제 #2
0
파일: Update.php 프로젝트: Andyyang1981/pi
 /**
  * {@inheritDoc}
  */
 protected function attachDefaultListeners()
 {
     $events = $this->events;
     $events->attach('update.pre', array($this, 'updateSchema'));
     parent::attachDefaultListeners();
     return $this;
 }
예제 #3
0
파일: Update.php 프로젝트: Andyyang1981/pi
 /**
  * {@inheritDoc}
  */
 protected function attachDefaultListeners()
 {
     $events = $this->events;
     $events->attach('update.post', array($this, 'updateCarousel'));
     parent::attachDefaultListeners();
     return $this;
 }
예제 #4
0
파일: Update.php 프로젝트: pi-module/demo
 protected function attachDefaultListeners()
 {
     $events = $this->events;
     $events->attach('install.post', array($this, 'postUpdate'));
     parent::attachDefaultListeners();
     return $this;
 }