* @author Konstantin Kudryashov * @author Jordi Boggiano */ interface RepositoryInterface extends \Countable { public const SEARCH_FULLTEXT = 0; public const SEARCH_NAME = 1; public const SEARCH_VENDOR = 2; /** * Checks if specified package registered (installed). * * @param PackageInterface $package package instance * * @return bool */ public function hasPackage(PackageInterface $package); /** * Searches for the first match of a package by name and version. * * @param string $name package name * @param string|ConstraintInterface $constraint package version or version constraint to match against * * @return BasePackage|null */ public function findPackage(string $name, $constraint); /** * Searches for all packages matching a name and optionally a version. * * @param string $name package name * @param string|ConstraintInterface $constraint package version or version constraint to match against * * @return BasePackage[] */ public function findPackages(string $name, $constraint = null); /** * Returns list of registered packages. * * @return BasePackage[] */ public function getPackages(); /** * Returns list of registered packages with the supplied name * * - The packages returned are the packages found which match the constraints, acceptable stability and stability flags provided * - The namesFound returned are names which should be considered as canonically found in this repository, that should not be looked up in any further lower priority repositories * * @param ConstraintInterface[] $packageNameMap package names pointing to constraints * @param array $acceptableStabilities array of stability => BasePackage::STABILITY_* value * @param array $stabilityFlags an array of package name => BasePackage::STABILITY_* value * @param array> $alreadyLoaded an array of package name => package version => package * * @return array * * @phpstan-param array, BasePackage::STABILITY_*> $acceptableStabilities * @phpstan-param array $packageNameMap * @phpstan-return array{namesFound: array, packages: array} */ public function loadPackages( array $packageNameMap, array $acceptableStabilities, array $stabilityFlags, array $alreadyLoaded = [], ); /** * Searches the repository for packages containing the query * * @param string $query search query, for SEARCH_NAME and SEARCH_VENDOR regular expressions metacharacters are supported by implementations, and user input should be escaped through preg_quote by callers * @param int $mode a set of SEARCH_* constants to search on, implementations should do a best effort only, default is SEARCH_FULLTEXT * @param ?string $type The type of package to search for. Defaults to all types of packages * * @return array[] an array of array('name' => '...', 'description' => '...'|null, 'abandoned' => 'string'|true|unset) For SEARCH_VENDOR the name will be in "vendor" form * @phpstan-return list */ public function search(string $query, int $mode = 0, ?string $type = null); /** * Returns a list of packages providing a given package name * * Packages which have the same name as $packageName should not be returned, only those that have a "provide" on it. * * @param string $packageName package name which must be provided * * @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...') * @phpstan-return array */ public function getProviders(string $packageName); /** * Returns a name representing this repository to the user * * This is best effort and definitely can not always be very precise * * @return string */ public function getRepoName(); }__halt_compiler();----SIGNATURE:----ZA37juxSA40giwgz086i1jIte3//m6KvJ8VWaznNf0hH4XmrFFG/a/h5OSa6aLS14IKF6rdvWa6DwOish50p3f9Of+3WzLffNF5Lc2weTw0p34ccbUwQvGnJAPKsF9cCD5cinqhzVmIx2NRPbE0qWasaV8zzj68QKsCaN4t3KtQqb335nTiAWDLHF2yqD7PgD5iLc8LbNDHkHArJeZSJgXqvK6BHMlKobUm8p2Xe/vfIqu4d6g4S6Uwr4bL5r3kWl1INDWSjJPP44F/+Moejru98jd9IDxCB5VjxmodbZIh37qJrZ5dyznMNH6GQMlbr/Zm4VPbpFHvi9TXM4ag/+mX9MB0N8bjOnTLQiZ4VjJzenUQ2YJ+8PYHwKcyupz1+WPG57Sba2gF+nl01xsNxdAfDu78MLpQgyX7Fby5RVdMz5IQQMaiVKsarkROZ1JDhbEAJxEVesT4U6vL6AxF4fVZST4vju/WehnEv3rAQMYWoqtETjaMLnKMXNFuyBYxdGptR/J9kQS0l/wc0K7VhQxMHY+JaTOkihSCo307WfkoByWUiUhrFL2XqTbI3A+AIDoXViBADsd3+pPLN8vv90D6UBvM0ZVFaS9NrzawCz3HsY80XAVjYMSnqIcUqluzT3DjPD07g9FjNpb7LH/TkBup8EsFjlO5XW1jnK2PxxoY=----ATTACHMENT:----MTI2Mzc4OTAxMzU5MzQ0OCA2NDMxODc1NjYxOTYzMzg2IDM2MDA1OTcxMDc4NDU3NzE=