1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
loader.php
См. документацию.
1<?
2
3namespace Bitrix\Pull;
4
5class Loader
6{
7 public static function register()
8 {
9 if (!static::isAlreadyRegistered())
10 {
11 \spl_autoload_register(array(__CLASS__, "autoLoad"), true);
12 }
13 }
14
15 public static function autoLoad($className)
16 {
17 $className = ltrim($className, "\\"); // fix web env
18 $className = str_replace("\\", '/', $className);
19
20 if (preg_match("#[^\\\\/a-zA-Z0-9_]#", $className))
21 {
22 return;
23 }
24
25 $fileParts = explode("/", $className);
26 if (count($fileParts) < 2)
27 {
28 return;
29 }
30
31 $firstNamespace = mb_strtolower($fileParts[0]);
32 $secondNamespace = mb_strtolower($fileParts[1]);
33
34 if (
35 $firstNamespace === "protobuf" ||
36 $firstNamespace === "google" && $secondNamespace === "protobuf" ||
37 $firstNamespace === "gpbmetadata" && $secondNamespace === "google"
38 )
39 {
40 $documentRoot = $documentRoot = rtrim($_SERVER["DOCUMENT_ROOT"], "/\\");
41 $filePath = $documentRoot."/bitrix/modules/pull/vendor/".implode("/", $fileParts).".php";
42
43 if (file_exists($filePath))
44 {
45 require_once($filePath);
46 }
47 }
48 }
49
50 private static function isAlreadyRegistered()
51 {
52 $autoLoaders = spl_autoload_functions();
53 if (!$autoLoaders)
54 {
55 return false;
56 }
57
58 foreach ($autoLoaders as $autoLoader)
59 {
60 if (!is_array($autoLoader))
61 {
62 continue;
63 }
64
65 list($className, $method) = $autoLoader;
66
67 if ($className === __CLASS__)
68 {
69 return true;
70 }
71 }
72
73 return false;
74 }
75}
Определения loader.php:13
static autoLoad($className)
Определения loader.php:15
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$_SERVER["DOCUMENT_ROOT"]
Определения cron_frame.php:9
foreach(['Bitrix\\Main'=> '/lib', 'Psr\\Container'=> '/vendor/psr/container/src', 'Psr\\Log'=> '/vendor/psr/log/src', 'Psr\\Http\\Message'=> '/vendor/psr/http-message/src', 'Psr\\Http\\Client'=> '/vendor/psr/http-client/src', 'Http\\Promise'=> '/vendor/php-http/promise/src', 'PHPMailer\\PHPMailer'=> '/vendor/phpmailer/phpmailer/src', 'GeoIp2'=> '/vendor/geoip2/geoip2/src', 'MaxMind\\Db'=> '/vendor/maxmind-db/reader/src/MaxMind/Db', 'PhpParser'=> '/vendor/nikic/php-parser/lib/PhpParser', 'Recurr'=> '/vendor/simshaun/recurr/src/Recurr',] as $namespace=> $namespacePath) $documentRoot
Определения autoload.php:27
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
$method
Определения index.php:27