Esempio n. 1
0
*/
if (!class_exists('SomeLoader')) {
    require_once SOME_LIBRARY . DS . 'loader.php';
}
SomeLoader::register('JFilterInput', SOME_LIBRARY . DS . 'some' . DS . 'filter' . DS . 'filterinput.php');
//Environment classes
SomeLoader::import('some.environment.request');
SomeRequest::clean();
SomeLoader::import('some.environment.response');
SomeLoader::import('some.factory');
SomeLoader::import('some.user.user');
//register exception classes
SomeLoader::register('SomeFrameworkException', SOME_LIBRARY . DS . 'some' . DS . 'exception' . DS . 'frameworkexception.php');
SomeLoader::register('SomeDatabaseException', SOME_LIBRARY . DS . 'some' . DS . 'exception' . DS . 'databaseexception.php');
SomeLoader::register('SomeFileNotFoundException', SOME_LIBRARY . DS . 'some' . DS . 'exception' . DS . 'filenotfoundexception.php');
SomeLoader::register('SomeClassNotFoundException', SOME_LIBRARY . DS . 'some' . DS . 'exception' . DS . 'classnotfoundexception.php');
//class SomeText
/**
* class to help translations of strings.
* @package wo2009
*/
class SomeText
{
    /**
     * Translates a string into the current language
     *
     * @access	public
     * @param	string $string The string to translate
     * @param	boolean	$jsSafe		Make the result javascript safe
     *
     */
Esempio n. 2
0
 /**
  * Load the file for a class
  *
  * @access  public
  * @param   string  $class  The class that will be loaded
  * @return  boolean True on success
  * @since   1.5
  */
 public static function load($class)
 {
     $class = strtolower($class);
     //force to lower case
     if (class_exists($class)) {
         return;
     }
     $classes = SomeLoader::register();
     if (array_key_exists(strtolower($class), $classes)) {
         include $classes[$class];
         return true;
     }
     return false;
 }