function RepositoryInterface::search
Searches the repository for packages containing the query
@phpstan-return list<array{name: string, description: ?string, abandoned?: string|true, url?: string}>
Parameters
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:
int $mode a set of SEARCH_* constants to search on, implementations should do a best effort only, default is SEARCH_FULLTEXT:
?string $type The type of package to search for. Defaults to all types of packages:
Return value
array[] an array of array('name' => '...', 'description' => '...'|null, 'abandoned' => 'string'|true|unset) For SEARCH_VENDOR the name will be in "vendor" form
3 methods override RepositoryInterface::search()
- ArrayRepository::search in vendor/
composer/ composer/ src/ Composer/ Repository/ ArrayRepository.php - @inheritDoc
- CompositeRepository::search in vendor/
composer/ composer/ src/ Composer/ Repository/ CompositeRepository.php - @inheritDoc
- FilterRepository::search in vendor/
composer/ composer/ src/ Composer/ Repository/ FilterRepository.php - @inheritDoc
File
-
vendor/
composer/ composer/ src/ Composer/ Repository/ RepositoryInterface.php, line 97
Class
- RepositoryInterface
- Repository interface.
Namespace
Composer\RepositoryCode
public function search(string $query, int $mode = 0, ?string $type = null);