public function display($file, $directory = null, $directOutput = false)
    {
        $output = Factory::getInstance()->output;
        $directory = (is_null($directory) ? $this->directory : $directory);

        if ($directOutput === true)
        {
            echo $this->get($file, $directory);
        }
        else
        {
            $output->append_output($this->get($file, $directory));  
        }
        
        return;
    }
public function display($file, $directory = null, $directOutput = false)
    {
        $output = Factory::getInstance()->output;
        $directory = (is_null($directory) ? $this->directory : $directory);

        if ($directOutput === true)
        {
            echo $this->get($file, $directory);
        }
        else
        {
            $output->append_output($this->get($file, $directory));  
        }
        
        return;
    }
public function display ( $ file , $ directory = null , $ directOutput = false ) { $ output = Factory :: getInstance ( ) -> output ; $ directory = ( is_null ( $ directory ) ? $ this -> directory : $ directory ) ; if ( $ directOutput === true ) { echo $ this -> get ( $ file , $ directory ) ; } else { $ output -> append_output ( $ this -> get ( $ file , $ directory ) ) ; } return ; }
Retrieve a template file using a string and a directory and immediatly parse it to the output class.

What template file gets loaded depends on the template engine that is being used.
PHP for example uses .php files. Providing this function with 'home/dashboard' will load the home/layout.dashboard.php file.
You can also provide no particular engine, and the manager will decide what template to load.
Remember that doing so will result in a LayoutException when multiple compatible files are found.

@param string $file         File to load
@param string $directory    Directory to load it from
@param bool   $directOutput Whether to directly output the result with an echo or send it to the output class. True if echo

@throws LayoutException On error
Retrieve a template file using a string and a directory and immediatly parse it to the output class .