food_server/vendor/hyperf/contract/src/ContainerInterface.php
tk 9ef6902c1d 【类 型】:fix
【主	题】:提交runing字段
【描	述】:
	[原因]:正则匹配 bind_route 添加runing字段 PS:对应取出bind_route的, 即分割符
	[过程]:
	[影响]:
【结	束】
2024-07-09 17:35:54 +08:00

54 lines
1.7 KiB
PHP

<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace Hyperf\Contract;
use Psr\Container\ContainerInterface as PsrContainerInterface;
interface ContainerInterface extends PsrContainerInterface
{
/**
* Build an entry of the container by its name.
* This method behave like get() except resolves the entry again every time.
* For example if the entry is a class then a new instance will be created each time.
* This method makes the container behave like a factory.
*
* @param string $name entry name or a class name
* @param array $parameters Optional parameters to use to build the entry. Use this to force specific parameters
* to specific values. Parameters not defined in this array will be resolved using
* the container.
* @throws InvalidArgumentException the name parameter must be of type string
* @throws NotFoundException no entry found for the given name
*/
public function make(string $name, array $parameters = []);
/**
* Bind an arbitrary resolved entry to an identifier.
* Useful for testing 'get'.
*
* @param mixed $entry
*/
public function set(string $name, $entry): void;
/**
* Unbind an arbitrary resolved entry.
*/
public function unbind(string $name): void;
/**
* Bind an arbitrary definition to an identifier.
* Useful for testing 'make'.
*
* @param array|callable|string $definition
*/
public function define(string $name, $definition): void;
}