/**
* @static
* @return array
*/
public static function createClassMappings()
{
$modelsDir = PIMCORE_PATH . "/models/";
$files = rscandir($modelsDir);
$includePatterns = array("/Webservice\\/Data/");
foreach ($files as $file) {
if (is_file($file)) {
$file = str_replace($modelsDir, "", $file);
$file = str_replace(".php", "", $file);
$class = str_replace(DIRECTORY_SEPARATOR, "_", $file);
if (\Pimcore\Tool::classExists($class)) {
$match = false;
foreach ($includePatterns as $pattern) {
if (preg_match($pattern, $file)) {
$match = true;
break;
}
}
if (strpos($file, "Webservice" . DIRECTORY_SEPARATOR . "Data") !== false) {
$match = true;
}
if (!$match) {
continue;
}
$classMap[str_replace("\\Pimcore\\Model\\Webservice\\Data\\", "", $class)] = $class;
}
}
}
return $classMap;
}