Bolt\Twig\TwigExtension::fileExists PHP Method

fileExists() public method

See also: Bolt\Twig\Handler\UtilsHandler::fileExists()
public fileExists ( $fn )
    public function fileExists($fn)
    {
        return $this->handlers['utils']->fileExists($fn, $this->safe);
    }

Usage Example

コード例 #1
0
ファイル: BoltTwigHelpersTest.php プロジェクト: annejan/bolt
 public function testFileExists()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $twig = new TwigExtension($app, $handlers, false);
     $this->assertTrue($twig->fileExists(__FILE__));
     // Test safe returns false
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $twig = new TwigExtension($app, $handlers, true);
     $this->assertFalse($twig->fileExists(__FILE__));
 }
All Usage Examples Of Bolt\Twig\TwigExtension::fileExists