17 $className = ltrim($className,
"\\");
18 $className = str_replace(
"\\",
'/', $className);
20 if (preg_match(
"#[^\\\\/a-zA-Z0-9_]#", $className))
25 $fileParts = explode(
"/", $className);
26 if (count($fileParts) < 2)
31 $firstNamespace = mb_strtolower($fileParts[0]);
32 $secondNamespace = mb_strtolower($fileParts[1]);
35 $firstNamespace ===
"protobuf" ||
36 $firstNamespace ===
"google" && $secondNamespace ===
"protobuf" ||
37 $firstNamespace ===
"gpbmetadata" && $secondNamespace ===
"google"
40 $documentRoot = $documentRoot = rtrim($_SERVER[
"DOCUMENT_ROOT"],
"/\\");
41 $filePath = $documentRoot.
"/bitrix/modules/pull/vendor/".implode(
"/", $fileParts).
".php";
43 if (file_exists($filePath))
45 require_once($filePath);