<?php
/**
 * CSS Handler
 */
 
    class css{
        
        static $instance , $i;
        
        public function __construct(){
            
            self::$instance = self::$i = $this;
            
        }
        
        public function put( $srcname , $mapname = false , $useMap = true ){
            
            if( is_array( $srcname ) ){
                
                foreach( $srcname as $name => $file ) page::$instance->css[$file] = $file;
                
            } else {
                
                page::$instance->css[$srcname] = $srcname;
            
            }
            
        }
        
        public function detectBrowserStyles(){
            
            if( stristr($_SERVER['HTTP_USER_AGENT'],'MSIE' ) ){
                css::$instance->put( 'browser-ie' );
            } elseif(stristr($_SERVER['HTTP_USER_AGENT'],'Chrome')){
                css::$instance->put( 'browser-chrome' );
            } elseif(stristr($_SERVER['HTTP_USER_AGENT'],'Firefox')) {
                // Brak akcji
            }
            
            
        }
        
    }


?>