public static function addFile($filePath, $extensionToFind = '.php')
    {
		if (!$filePath instanceof SplFileInfo) {
			$filePath = new SplFileInfo($filePath);
        }

		$firstChar = substr($filePath->getBasename(), 0, 1);
		$extension = substr($filePath->getFilename(), strlen($extensionToFind)*-1);
		$className = $filePath->getBasename($extension);
		if ($extension == $extensionToFind && $firstChar === strtoupper($firstChar)) {
			self::addClass($className, $filePath->getRealPath());
		}
	}
public static function addFile($filePath, $extensionToFind = '.php')
    {
		if (!$filePath instanceof SplFileInfo) {
			$filePath = new SplFileInfo($filePath);
        }

		$firstChar = substr($filePath->getBasename(), 0, 1);
		$extension = substr($filePath->getFilename(), strlen($extensionToFind)*-1);
		$className = $filePath->getBasename($extension);
		if ($extension == $extensionToFind && $firstChar === strtoupper($firstChar)) {
			self::addClass($className, $filePath->getRealPath());
		}
	}
public static function addFile ( $ filePath , $ extensionToFind = '.php' ) { if ( ! $ filePath instanceof SplFileInfo ) { $ filePath = new SplFileInfo ( $ filePath ) ; } $ firstChar = substr ( $ filePath -> getBasename ( ) , 0 , 1 ) ; $ extension = substr ( $ filePath -> getFilename ( ) , strlen ( $ extensionToFind ) * - 1 ) ; $ className = $ filePath -> getBasename ( $ extension ) ; if ( $ extension == $ extensionToFind && $ firstChar === strtoupper ( $ firstChar ) ) { self :: addClass ( $ className , $ filePath -> getRealPath ( ) ) ; } }
Evaluates a file and if it looks like a php
class it will add it.  This prevents odd php files
that aren't classes from being auto loaded like
"bootstrap.php" or "autoload.php", etc.

@param string $filePath
@param string $extensionToFind

@return void
Evaluates a file and if it looks like a php class it will add it . This prevents odd php files that aren t classes from being auto loaded like bootstrap . php or autoload . php etc .