| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace ByteDance;
- /**
- * Class Factory.
- *
- * @method static \ByteDance\MiniProgram\Application miniProgram(array $config)
- */
- class Factory
- {
- /**
- * @param array $config
- *
- * @return \ByteDance\Kernel\ServiceContainer
- */
- public static function make($name, array $config)
- {
- \Yii::warning([$name, $config]);
- $namespace = Kernel\Support\Str::studly($name);
- $application = "\\ByteDance\\{$namespace}\\Application";
- return new $application($config);
- }
- /**
- * Dynamically pass methods to the application.
- *
- * @param string $name
- * @param array $arguments
- *
- * @return mixed
- */
- public static function __callStatic($name, $arguments)
- {
- return self::make($name, ...$arguments);
- }
- }
|