public static function classes(array $options = []) {
		$defaults = ['group' => 'classes', 'file' => null];
		$options += $defaults;

		$list = get_declared_classes();
		$files = get_included_files();
		$classes = [];

		if ($file = $options['file']) {
			$loaded = static::_instance('collection', ['data' => array_map(
				function($class) { return new ReflectionClass($class); }, $list
			)]);
			$classFiles = $loaded->getFileName();

			if (in_array($file, $files) && !in_array($file, $classFiles)) {
				return [];
			}
			if (!in_array($file, $classFiles)) {
				include $file;
				$list = array_diff(get_declared_classes(), $list);
			} else {
				$filter = function($class) use ($file) { return $class->getFileName() === $file; };
				$list = $loaded->find($filter)->map(function ($class) {
					return $class->getName() ?: $class->name;
				}, ['collect' => false]);
			}
		}

		foreach ($list as $class) {
			$inspector = new ReflectionClass($class);

			if ($options['group'] === 'classes') {
				$inspector->getFileName() ? $classes[$class] = $inspector->getFileName() : null;
			} elseif ($options['group'] === 'files') {
				$classes[$inspector->getFileName()][] = $inspector;
			}
		}
		return $classes;
	}