コード例 #1
0
ファイル: Dirk.php プロジェクト: artoodetoo/dirk
 public function __construct(array $config = [])
 {
     $config = array_replace_recursive(['ext' => '.dirk.html', 'cache' => '.', 'echo' => 'htmlspecialchars(%s, ENT_QUOTES, \'UTF-8\')'], $config);
     $this->cache = isset($config['cache']) ? $config['cache'] : '.';
     $this->echoFormat = isset($config['echo']) ? $config['echo'] : '%s';
     parent::__construct($config);
 }
コード例 #2
0
ファイル: PhpEngineTest.php プロジェクト: artoodetoo/dirk
 /**
  * @covers R2\Templating\PhpEngine::exists
  */
 public function testExists()
 {
     $name = $this->template('dummy');
     $this->assertTrue($this->engine->exists($name));
     $this->assertFalse($this->engine->exists('some-weird-name'));
 }