/** * The method sets the path of the html of the controler. * * @param string $template * @return MAbstractViewController */ protected function setTemplate($template) { MDataType::mustBeString($template); $this->template = $template; return $this; }
/** * Sets the file that the QFileInfo provides information about to file.<br /> * <br /> * The file can also include an absolute or relative file path. Absolute * paths begin with the directory separator (e.g. "/" under Unix) or a drive * specification (under Windows). Relative file names begin with a directory * name or a file name and specify a path relative to the current directory. * * @param string $file */ public function setFile($file) { MDataType::mustBeString($file); $this->file = $file; $this->refresh(); }
/** * Appends the string <i>$str</i> at the end of this string. It is possible to use <i>$args</i>.<br> * Example: * <pre> * $helloWorld = new MString(); * $helloWorld->append('Hello world %s', 'user'); * echo $helloWorld; * </pre> * * @param string $str * @param mixed $args [optional] * @return MString */ public function append($str, $args = null) { MDataType::mustBeString($str); $this->text .= sprintf($str, $args); return new MString($this->text); }
/** * Returns true if the directory <i>$path</i> is relative; otherwise returns * false. (Under Unix a path is relative if it does not start with a "/"). * * @param string $path * @return boolean */ public function isRelativePath($path) { MDataType::mustBeString($path); $fileInfo = new MFileInfo($path); return $fileInfo->isAbsolute() === false; }
/** * @param string $id * @return MAbstractController */ protected function getControl($id) { MDataType::mustBeString($id); return $this->controls->getValue($id); }
public function setValue($value) { MDataType::mustBeString($value); $this->value = $value; return $this; }