public function setFileFromString($string, $directory, $extensions = array())
    {
        $this->file = $this->getFileFromString($string, $directory, $extensions);
        $this->directory = preg_replace('#/+#', '/', (!is_null($directory) ? $directory : $this->directory).DS);
    }
public function setFileFromString($string, $directory, $extensions = array())
    {
        $this->file = $this->getFileFromString($string, $directory, $extensions);
        $this->directory = preg_replace('#/+#', '/', (!is_null($directory) ? $directory : $this->directory).DS);
    }
public function setFileFromString ( $ string , $ directory , $ extensions = array ( ) ) { $ this -> file = $ this -> getFileFromString ( $ string , $ directory , $ extensions ) ; $ this -> directory = preg_replace ( '#/+#' , '/' , ( ! is_null ( $ directory ) ? $ directory : $ this -> directory ) . DS ) ; }
Converts a layout string to a file using the directory and the used extensions.
It also sets the file variable of this class.

It will detect whether the file exists and choose a file according to the provided extensions

@param string $string     The string used by a controller. eg: 'dashboard/home'
@param string $directory  The directory to search in for the template
@param array  $extensions Extensions to use for this template. Eg array('php', 'tpl') etc.

@return string Filepath of the template
@throws LayoutException On error
Converts a layout string to a file using the directory and the used extensions . It also sets the file variable of this class .