| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | /* | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  |     Scalable Inman Flash Replacement (sIFR) is an open source JavaScript and Macromedia Flash | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |     based technology initially developed by Shaun Inman and improved by Mike Davidson and Mark | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |     Wubben that enables the replacement of text elements on HTML web pages with Flash equivalents. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |     Mike Davidsons website | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |     @see http://www.mikeindustries.com/sifr | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |     sIFR Wiki and help forum | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |     @see http://wiki.novemberborn.net/sifr | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  | class Sifr extends Object | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |     protected static $is_disabled = false; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |     protected static $js_custom_file_location = "mysite/javascript/sifr-config.js"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  | 
            
                                                                                                            
                            
            
                                                                    
                                                                                                        
            
            
                | 21 |  | View Code Duplication |     public static function disable() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |         self::$is_disabled = true; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |         Requirements::block("sifr/css/sifr.css"); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |         Requirements::block("sifr-themed"); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |         Requirements::block("sifr/javascript/sifr.js"); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |         Requirements::block("sifr/javascript/sifr-debug.js"); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |         Requirements::block(self::$js_custom_file_location); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |     public static function set_js_custom_file_location($folderAndFile) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |         self::$js_custom_file_location = $folderAndFile; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 35 |  |  |  | 
            
                                                                        
                            
            
                                                                    
                                                                                                        
            
            
                | 36 |  | View Code Duplication |     public static function load_sifr() | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                        
                            
            
                                    
            
            
                | 37 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 38 |  |  |         if (!self::$is_disabled) { | 
            
                                                                        
                            
            
                                    
            
            
                | 39 |  |  |             Requirements::css("sifr/css/sifr.css", 'screen, projection'); | 
            
                                                                        
                            
            
                                    
            
            
                | 40 |  |  |             Requirements::themedCSS("sifr-themed", 'screen, projection'); | 
            
                                                                        
                            
            
                                    
            
            
                | 41 |  |  |             Requirements::javascript("sifr/javascript/sifr.js"); | 
            
                                                                        
                            
            
                                    
            
            
                | 42 |  |  |             Requirements::javascript("sifr/javascript/sifr-debug.js"); | 
            
                                                                        
                            
            
                                    
            
            
                | 43 |  |  |             Requirements::javascript(self::$js_custom_file_location); | 
            
                                                                        
                            
            
                                    
            
            
                | 44 |  |  |         } | 
            
                                                                        
                            
            
                                    
            
            
                | 45 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |     public function is_disabled() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |         $state = self::$is_disabled; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |         return ($state) ? true : false; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 52 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 53 |  |  |  | 
            
                        
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.