Example #1
0
 public function testDisplayWithArgNotBlade()
 {
     $this->expectOutputString('hasan gilak');
     $finder = new \Wp\View\Finder();
     $finder->viewsDirection = __DIR__;
     $view = new Wp\View\View($finder);
     $view->display(['path' => __DIR__ . '/arg.php', 'isBlade' => false], ['name' => 'hasan gilak']);
 }
Example #2
0
 /**
  * register the setting page and path settings values to the view
  */
 public static function setting()
 {
     Theme::setting(function () {
         $matched = self::settingData();
         $settings = AFormatter::objectiveSettings(Applum::find(1));
         View::make('admin/setting', ['matched' => $matched, 'settings' => $settings]);
     });
 }
Example #3
0
 public static function gallery($data)
 {
     View::make('site/body/gallery/gallery', ['gallery' => $data->gallery]);
 }
Example #4
0
 public function testGetInstanceWithArg()
 {
     @View::getInstance(__DIR__);
     $this->assertEquals(__DIR__, View::$view->finder->viewsDirection);
 }