@@ 47-53 (lines=7) @@ | ||
44 | $class = 'Xoops' . ucfirst($name) . 'Handler'; |
|
45 | if (in_array($name, array('file', 'folder'))) { |
|
46 | $handler = new $class($path, $create, $mode); |
|
47 | } else { |
|
48 | trigger_error( |
|
49 | 'Class ' . $class . ' not exist in File ' . __FILE__ . ' at Line ' . __LINE__, |
|
50 | E_USER_WARNING |
|
51 | ); |
|
52 | return false; |
|
53 | } |
|
54 | return $handler; |
|
55 | } |
|
56 | } |
@@ 124-131 (lines=8) @@ | ||
121 | //attempt loading from file |
|
122 | include_once $file; |
|
123 | $class = 'Xoops' . ucfirst($name); |
|
124 | if (class_exists($class)) { |
|
125 | return $class; |
|
126 | } else { |
|
127 | trigger_error( |
|
128 | 'Class ' . $name . ' not found in file ' . __FILE__ . 'at line ' . __LINE__, |
|
129 | E_USER_WARNING |
|
130 | ); |
|
131 | } |
|
132 | } |
|
133 | ||
134 | return false; |