public function fromFile($path) { if (Fn::isBlank($path)) { throw new Exception('Empty template name'); } $full_path = self::$settings['view'] . '/' . Helper::realPath($path) . '.' . self::$settings['extension']; $this->logic_path = self::$settings['logic'] . '/' . Helper::realPath($path) . '.php'; $content = IO::init()->in($full_path)->get(); return $this->fromString($content); }
/** * Load template from file * * @param string $path path to template * * @return Ant\Render */ public function fromFile($path) { if (Fn::isBlank($path)) { throw new Exception('Empty template name'); } $fullPath = $this->ant->settings('view') . '/' . Helper::realPath($path) . '.' . $this->ant->settings('extension'); $content = IO::init()->in($fullPath)->get(); return $this->fromString($content); }