You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							66 lines
						
					
					
						
							1.4 KiB
						
					
					
				
			
		
		
	
	
							66 lines
						
					
					
						
							1.4 KiB
						
					
					
				<?php
 | 
						|
 | 
						|
namespace Shibboleth;
 | 
						|
 | 
						|
use \Display;
 | 
						|
 | 
						|
/**
 | 
						|
 * Utility display functions tailored for the Shibboleth pluging.
 | 
						|
 * 
 | 
						|
 * @license see /license.txt
 | 
						|
 * @author Laurent Opprecht <laurent@opprecht.info>, Nicolas Rod for the University of Geneva
 | 
						|
 */
 | 
						|
class ShibbolethDisplay
 | 
						|
{
 | 
						|
 | 
						|
    /**
 | 
						|
     *
 | 
						|
     * @return ShibbolethDisplay 
 | 
						|
     */
 | 
						|
    public static function instance()
 | 
						|
    {
 | 
						|
        static $result = false;
 | 
						|
        if (empty($result))
 | 
						|
        {
 | 
						|
            $result = new self();
 | 
						|
        }
 | 
						|
        return $result;
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * @param string $message
 | 
						|
     */
 | 
						|
    public function error_page($message)
 | 
						|
    {
 | 
						|
        $page_title = get_lang('ShibbolethLogin');
 | 
						|
 | 
						|
        Display :: display_header($page_title);
 | 
						|
        Display :: display_error_message($message);
 | 
						|
        Display :: display_footer();
 | 
						|
        die;
 | 
						|
    }
 | 
						|
    
 | 
						|
    /**
 | 
						|
     * @param string $message
 | 
						|
     */
 | 
						|
    public function message_page($message, $title = '')
 | 
						|
    {
 | 
						|
        $title = $title ? $title : get_lang('ShibbolethLogin');
 | 
						|
 | 
						|
        Display :: display_header($title);
 | 
						|
        Display :: display_confirmation_message($message);
 | 
						|
        Display :: display_footer();
 | 
						|
        die;
 | 
						|
    }
 | 
						|
    
 | 
						|
    public function page($content, $title = '')
 | 
						|
    {
 | 
						|
        $title = $title ? $title : get_lang('ShibbolethLogin');
 | 
						|
 | 
						|
        Display :: display_header($title);
 | 
						|
        echo $content;
 | 
						|
        Display :: display_footer();
 | 
						|
        die;
 | 
						|
    }
 | 
						|
 | 
						|
}
 | 
						|
 |