Changeset 33 for trunk/lib/CSS.inc.php
- Timestamp:
- Dec 11, 2005 9:53:52 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/CSS.inc.php
r32 r33 12 12 13 13 // Include these style sheets. 14 var $_css_files = array(' _default' => array());14 var $_css_files = array('default' => array()); 15 15 16 16 // Cache style sheets? … … 57 57 * 58 58 * @access public 59 * 60 * @param string Full path to css file. 61 * 59 * @param string $file Include path to css files. 60 * @param mixed $apps App name string or array of app names. 62 61 * @return bool True on success, false on failure. 63 62 */ 64 function setFile($file, $app ='_default')63 function setFile($file, $apps='') 65 64 { 65 if (!is_array($apps)) { 66 $apps = array($apps); 67 } 68 66 69 if ($fp = fopen($file, 'r', true)) { 67 $this->_css_files[$app][] = $file; 70 foreach ($apps as $app) { 71 $app = '' == $app ? 'default' : $app; 72 $this->_css_files[$app][] = $file; 73 } 68 74 fclose($fp); 69 75 return true; … … 81 87 * @return bool False if no files have been set. 82 88 */ 83 function headers($app=' _default')89 function headers($app='') 84 90 { 91 $app = '' == $app ? 'default' : $app; 92 85 93 if (empty($this->_css_files[$app])) { 86 94 App::logMsg(sprintf('CSS::headers called without specifying any files.', null), LOG_WARNING, __FILE__, __LINE__); … … 114 122 * @return bool False if no files have been set. 115 123 */ 116 function output($app=' _default')124 function output($app='') 117 125 { 126 $app = '' == $app ? 'default' : $app; 127 118 128 if (empty($this->_css_files[$app])) { 119 129 App::logMsg(sprintf('CSS::output called without specifying any files.', null), LOG_WARNING, __FILE__, __LINE__);
Note: See TracChangeset
for help on using the changeset viewer.