src/classes/CCView.php
protected function view_path( $view )
	{
		if ( isset( static::$_view_paths[$view] ) )
		{
			return static::$_view_paths[$view];
		}
		
		// view is empty?
		if ( is_null( $view ) )
		{
			throw new CCException( "CCView - cannot render view without a view file." );
		}
		
		// generate the views path
		$path = CCPath::get( $view, CCDIR_VIEW, EXT );
		
		if ( !file_exists( $path ) ) 
		{
			throw new CCException( "CCView - could not find view: ".$view." at: {$path}." );
		}
		
		// does the view implement a view builder?
		if ( strpos( $view, '.' ) !== false )
		{
			$cache = static::cache_path( $view );
			
			// does the cache not exits or is out of date
			if ( !file_exists( $cache ) || filemtime( $cache ) < filemtime( $path ) )
			{
				list( $view_name, $builder ) = explode( '.', $view );
				$this->build_cache( $cache, $builder, $path );
			}
			
			$path = $cache;
		}
		
		return static::$_view_paths[$view] = $path;
	}
protected function view_path( $view )
	{
		if ( isset( static::$_view_paths[$view] ) )
		{
			return static::$_view_paths[$view];
		}
		
		// view is empty?
		if ( is_null( $view ) )
		{
			throw new CCException( "CCView - cannot render view without a view file." );
		}
		
		// generate the views path
		$path = CCPath::get( $view, CCDIR_VIEW, EXT );
		
		if ( !file_exists( $path ) ) 
		{
			throw new CCException( "CCView - could not find view: ".$view." at: {$path}." );
		}
		
		// does the view implement a view builder?
		if ( strpos( $view, '.' ) !== false )
		{
			$cache = static::cache_path( $view );
			
			// does the cache not exits or is out of date
			if ( !file_exists( $cache ) || filemtime( $cache ) < filemtime( $path ) )
			{
				list( $view_name, $builder ) = explode( '.', $view );
				$this->build_cache( $cache, $builder, $path );
			}
			
			$path = $cache;
		}
		
		return static::$_view_paths[$view] = $path;
	}
protected function view_path ( $ view ) { if ( isset ( static :: $ _view_paths [ $ view ] ) ) { return static :: $ _view_paths [ $ view ] ; } // view is empty? if ( is_null ( $ view ) ) { throw new CCException ( "CCView - cannot render view without a view file." ) ; } // generate the views path $ path = CCPath :: get ( $ view , CCDIR_VIEW , EXT ) ; if ( ! file_exists ( $ path ) ) { throw new CCException ( "CCView - could not find view: " . $ view . " at: {$path}." ) ; } // does the view implement a view builder? if ( strpos ( $ view , '.' ) !== false ) { $ cache = static :: cache_path ( $ view ) ; // does the cache not exits or is out of date if ( ! file_exists ( $ cache ) || filemtime ( $ cache ) < filemtime ( $ path ) ) { list ( $ view_name , $ builder ) = explode ( '.' , $ view ) ; $ this -> build_cache ( $ cache , $ builder , $ path ) ; } $ path = $ cache ; } return static :: $ _view_paths [ $ view ] = $ path ; }
Get the path to real view file

This function will also build the cache view file if needed.

@param string 		$path
@return string
Get the path to real view file