setFile($file); if ($namespace) { $this->setNamespace($namespace); } else { $fileParts = explode('.', $file); if (count($fileParts) === 1) { $this->setNamespace($file); } } } /** * Set the File * * @param string $file Include File * @return \FML\Script\ScriptInclude */ public function setFile($file) { $this->file = $file; return $this; } /** * Set the Namespace * * @param string $namespace Include Namespace * @return \FML\Script\ScriptInclude */ public function setNamespace($namespace) { $this->namespace = $namespace; return $this; } /** * Get the Namespace * * @return string */ public function getNamespace() { return $this->namespace; } /** * Build the Script Include Text * * @return string */ public function __toString() { $scriptText = Builder::getInclude($this->file, $this->namespace); return $scriptText; } }