private function _extractPackageName($filename) {
		$filename = str_replace('/', '.', $filename);
		$filename = str_replace('\\', '.', $filename);
		while (strpos($filename, '.') === 0) {
			$filename = substr($filename, 1);
		}
		if (strlen($filename) > 4) { // remove the .php at the end
			$filename = substr($filename, 0, -4);
		}

		// Identify the package name
		$packageName = substr($filename, 0, strrpos($filename, '.'));

		return $packageName;
	}
private function _extractPackageName($filename) {
		$filename = str_replace('/', '.', $filename);
		$filename = str_replace('\\', '.', $filename);
		while (strpos($filename, '.') === 0) {
			$filename = substr($filename, 1);
		}
		if (strlen($filename) > 4) { // remove the .php at the end
			$filename = substr($filename, 0, -4);
		}

		// Identify the package name
		$packageName = substr($filename, 0, strrpos($filename, '.'));

		return $packageName;
	}
private function _extractPackageName ( $ filename ) { $ filename = str_replace ( '/' , '.' , $ filename ) ; $ filename = str_replace ( '\\' , '.' , $ filename ) ; while ( strpos ( $ filename , '.' ) === 0 ) { $ filename = substr ( $ filename , 1 ) ; } if ( strlen ( $ filename ) > 4 ) { // remove the .php at the end $ filename = substr ( $ filename , 0 , - 4 ) ; } // Identify the package name $ packageName = substr ( $ filename , 0 , strrpos ( $ filename , '.' ) ) ; return $ packageName ; }
Extract a package name from the filename.

@param String $filename
the file name
Extract a package name from the filename .