.gitattributes000064400000000054151360552270007444 0ustar00/tests export-ignore /.github export-ignore LICENSE000064400000002054151360552270005560 0ustar00The MIT License (MIT) Copyright (c) Hyperf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. composer.json000064400000001353151360552270007276 0ustar00{ "name": "hyperf/contract", "description": "The contracts of Hyperf.", "license": "MIT", "keywords": [ "php", "swoole", "hyperf" ], "homepage": "https://hyperf.io", "support": { "issues": "https://github.com/hyperf/hyperf/issues", "source": "https://github.com/hyperf/hyperf", "docs": "https://hyperf.wiki", "pull-request": "https://github.com/hyperf/hyperf/pulls" }, "require": { "php": ">=8.1" }, "autoload": { "psr-4": { "Hyperf\\Contract\\": "src/" } }, "config": { "sort-packages": true }, "extra": { "branch-alias": { "dev-master": "3.1-dev" } } } src/ApplicationInterface.php000064400000000674151360552270012145 0ustar00 */ public function toArray(): array; } src/CanBeEscapedWhenCastToString.php000064400000001042151360552270013433 0ustar00|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. * * @return ($name is class-string ? TClass : mixed) * * @throws ContainerExceptionInterface&Throwable the name parameter must be of type string * @throws NotFoundExceptionInterface&Throwable 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; } src/DispatcherInterface.php000064400000000527151360552270011765 0ustar00