/** * Parses a path. * * @param $path * * @return null|string */ private static function ParsePath($path) { /** * First, we explode the path. */ $real_path = explode("\\", $path); /** * We then create a temporary string which will be added to. */ $built_path = ""; /** * We then loop */ foreach ($real_path as $key => $value) { /** * Extend the path */ $built_path = $built_path . $value . "/"; /** * If we find our sources folder */ if (FileMethods::DirectoryExists($built_path . PathFinder::$source_folder)) { /** * This is basically a safe check to find out if we found the right src */ if (PathFinder::FindSecret($built_path)) { /** * Return the correct path! */ return $built_path; } continue; } else { continue; } } return null; }