コード例 #1
0
ファイル: Decorator.php プロジェクト: itkg/core
 /**
  * @param \Itkg\Core\Command\DatabaseUpdate\Query $query
  * @param string $template
  * @return array
  */
 private function process(Query $query, $template)
 {
     if (file_exists($template)) {
         return $this->loader->load($template, $query->getData())->getQueries();
     }
     return array();
 }
コード例 #2
0
ファイル: LoaderTest.php プロジェクト: itkg/core
 public function testLoad()
 {
     $loader = new Loader();
     $loader->load(TEST_BASE_DIR . '/data/templates/pre_create_table_template.php', array('identifier' => 'MY_TABLE'));
     $this->assertEquals(array('PRE_CREATE_TEMPLATE MY_TABLE'), $loader->getQueries());
 }