选择语言 :

 Core_View::capture

null Core_View::capture( )
File: ./core/classes/view.class.php
protected static function capture($myqee_view_filename, array $myqee_view_data)
{
    // Import the view variables to local namespace
    extract($myqee_view_data, EXTR_SKIP);

    if (View::$_global_data)
    {
        // Import the global view variables to local namespace and maintain references
        extract(View::$_global_data, EXTR_REFS);
    }

    // Capture the view output
    ob_start();

    try
    {
        // Load the view within the current scope
        include $myqee_view_filename;
    }
    catch (Exception $e)
    {
        // Delete the output buffer
        ob_end_clean();

        // Re-throw the exception
        throw $e;
    }

    // Get the captured output and close the buffer
    return ob_get_clean();
}