public function setViewPath($path)
    {
        $len = strlen($path) - 1;
        if ($path[$len] == '/') {
            $path = substr($path, 0, -1);
        }
        $realpath = realpath($path);;
        $this->_path = $realpath === false ? $path : $realpath;
    }
public function setViewPath($path)
    {
        $len = strlen($path) - 1;
        if ($path[$len] == '/') {
            $path = substr($path, 0, -1);
        }
        $realpath = realpath($path);;
        $this->_path = $realpath === false ? $path : $realpath;
    }
public function setViewPath ( $ path ) { $ len = strlen ( $ path ) - 1 ; if ( $ path [ $ len ] == '/' ) { $ path = substr ( $ path , 0 , - 1 ) ; } $ realpath = realpath ( $ path ) ; ; $ this -> _path = $ realpath === false ? $ path : $ realpath ; }
Sets the path where views are located.

@param string $path Path to the views directory.

@return void
Sets the path where views are located .