src/Loader.php
public function loadClass( $className )
	{
		if( $this->prefix )
		{
			$prefix	= strtolower( substr( $className, 0, strlen( $this->prefix ) ) );
			if( $prefix != $this->prefix )
				return FALSE;
			$className	= str_ireplace( $this->prefix, '', $className );
		}
		$basePath		= $this->path ? $this->path : "";
		if( $this->lowerPath )
		{
			$matches	= array();
			preg_match_all( '/^(.*)([a-z0-9]+)$/iU', $className, $matches );
			$fileName	= $matches[2][0];
			$pathName	= str_replace( "_","/", strtolower( $matches[1][0] ) );
			$fileName	= $pathName.$fileName;
		}
		else
			$fileName	= str_replace( "_","/", $className );
		foreach( $this->extensions as $extension )
		{
			$filePath	= $basePath.$fileName.".".$extension;
			if( $this->verbose > 1 )
				echo $this->lineBreak."autoload: ".$filePath;
			if( defined( 'LOADER_LOG' ) && LOADER_LOG )
				error_log( $filePath."\n", 3, LOADER_LOG );
#			if( !@fopen( $filePath, "r", TRUE ) )
			if( !file_exists( $filePath ) )
#			if( !is_readable( $filePath ) )
				continue;
			$this->loadFile( $filePath, TRUE );
			return TRUE;
		}
		return FALSE;
	}
public function loadClass( $className )
	{
		if( $this->prefix )
		{
			$prefix	= strtolower( substr( $className, 0, strlen( $this->prefix ) ) );
			if( $prefix != $this->prefix )
				return FALSE;
			$className	= str_ireplace( $this->prefix, '', $className );
		}
		$basePath		= $this->path ? $this->path : "";
		if( $this->lowerPath )
		{
			$matches	= array();
			preg_match_all( '/^(.*)([a-z0-9]+)$/iU', $className, $matches );
			$fileName	= $matches[2][0];
			$pathName	= str_replace( "_","/", strtolower( $matches[1][0] ) );
			$fileName	= $pathName.$fileName;
		}
		else
			$fileName	= str_replace( "_","/", $className );
		foreach( $this->extensions as $extension )
		{
			$filePath	= $basePath.$fileName.".".$extension;
			if( $this->verbose > 1 )
				echo $this->lineBreak."autoload: ".$filePath;
			if( defined( 'LOADER_LOG' ) && LOADER_LOG )
				error_log( $filePath."\n", 3, LOADER_LOG );
#			if( !@fopen( $filePath, "r", TRUE ) )
			if( !file_exists( $filePath ) )
#			if( !is_readable( $filePath ) )
				continue;
			$this->loadFile( $filePath, TRUE );
			return TRUE;
		}
		return FALSE;
	}
public function loadClass ( $ className ) { if ( $ this -> prefix ) { $ prefix = strtolower ( substr ( $ className , 0 , strlen ( $ this -> prefix ) ) ) ; if ( $ prefix != $ this -> prefix ) return FALSE ; $ className = str_ireplace ( $ this -> prefix , '' , $ className ) ; } $ basePath = $ this -> path ? $ this -> path : "" ; if ( $ this -> lowerPath ) { $ matches = array ( ) ; preg_match_all ( '/^(.*)([a-z0-9]+)$/iU' , $ className , $ matches ) ; $ fileName = $ matches [ 2 ] [ 0 ] ; $ pathName = str_replace ( "_" , "/" , strtolower ( $ matches [ 1 ] [ 0 ] ) ) ; $ fileName = $ pathName . $ fileName ; } else $ fileName = str_replace ( "_" , "/" , $ className ) ; foreach ( $ this -> extensions as $ extension ) { $ filePath = $ basePath . $ fileName . "." . $ extension ; if ( $ this -> verbose > 1 ) echo $ this -> lineBreak . "autoload: " . $ filePath ; if ( defined ( 'LOADER_LOG' ) && LOADER_LOG ) error_log ( $ filePath . "\n" , 3 , LOADER_LOG ) ; #			if( !@fopen( $filePath, "r", TRUE ) ) if ( ! file_exists ( $ filePath ) ) #			if( !is_readable( $filePath ) ) continue ; $ this -> loadFile ( $ filePath , TRUE ) ; return TRUE ; } return FALSE ; }
Try to load a Class by its Class Name.
@access		public
@param		string			$className			Class Name with encoded Path
@return		bool
Try to load a Class by its Class Name .