Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. VcsDriverInterface.php

interface VcsDriverInterface

@author Jordi Boggiano <j.boggiano@seld.be> @internal

Hierarchy

  • interface \Composer\Repository\Vcs\VcsDriverInterface

Expanded class hierarchy of VcsDriverInterface

All classes that implement VcsDriverInterface

1 file declares its use of VcsDriverInterface
VcsRepository.php in vendor/composer/composer/src/Composer/Repository/VcsRepository.php

File

vendor/composer/composer/src/Composer/Repository/Vcs/VcsDriverInterface.php, line 22

Namespace

Composer\Repository\Vcs
View source
interface VcsDriverInterface {
    
    /**
     * Initializes the driver (git clone, svn checkout, fetch info etc)
     */
    public function initialize() : void;
    
    /**
     * Return the composer.json file information
     *
     * @param  string  $identifier Any identifier to a specific branch/tag/commit
     * @return mixed[]|null Array containing all infos from the composer.json file, or null to denote that no file was present
     */
    public function getComposerInformation(string $identifier) : ?array;
    
    /**
     * Return the content of $file or null if the file does not exist.
     */
    public function getFileContent(string $file, string $identifier) : ?string;
    
    /**
     * Get the changedate for $identifier.
     */
    public function getChangeDate(string $identifier) : ?\DateTimeImmutable;
    
    /**
     * Return the root identifier (trunk, master, default/tip ..)
     *
     * @return string Identifier
     */
    public function getRootIdentifier() : string;
    
    /**
     * Return list of branches in the repository
     *
     * @return array<int|string, string> Branch names as keys, identifiers as values
     */
    public function getBranches() : array;
    
    /**
     * Return list of tags in the repository
     *
     * @return array<int|string, string> Tag names as keys, identifiers as values
     */
    public function getTags() : array;
    
    /**
     * @param string $identifier Any identifier to a specific branch/tag/commit
     *
     * @return array{type: string, url: string, reference: string, shasum: string}|null
     */
    public function getDist(string $identifier) : ?array;
    
    /**
     * @param string $identifier Any identifier to a specific branch/tag/commit
     *
     * @return array{type: string, url: string, reference: string}
     */
    public function getSource(string $identifier) : array;
    
    /**
     * Return the URL of the repository
     */
    public function getUrl() : string;
    
    /**
     * Return true if the repository has a composer file for a given identifier,
     * false otherwise.
     *
     * @param  string $identifier Any identifier to a specific branch/tag/commit
     * @return bool   Whether the repository has a composer file for a given identifier.
     */
    public function hasComposerFile(string $identifier) : bool;
    
    /**
     * Performs any cleanup necessary as the driver is not longer needed
     */
    public function cleanup() : void;
    
    /**
     * Checks if this driver can handle a given url
     *
     * @param  IOInterface $io     IO instance
     * @param  Config      $config current $config
     * @param  string      $url    URL to validate/check
     * @param  bool        $deep   unless true, only shallow checks (url matching typically) should be done
     */
    public static function supports(IOInterface $io, Config $config, string $url, bool $deep = false) : bool;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
VcsDriverInterface::cleanup public function Performs any cleanup necessary as the driver is not longer needed 1
VcsDriverInterface::getBranches public function Return list of branches in the repository 8
VcsDriverInterface::getChangeDate public function Get the changedate for $identifier. 8
VcsDriverInterface::getComposerInformation public function Return the composer.json file information 1
VcsDriverInterface::getDist public function 8
VcsDriverInterface::getFileContent public function Return the content of $file or null if the file does not exist. 8
VcsDriverInterface::getRootIdentifier public function Return the root identifier (trunk, master, default/tip ..) 8
VcsDriverInterface::getSource public function 8
VcsDriverInterface::getTags public function Return list of tags in the repository 8
VcsDriverInterface::getUrl public function Return the URL of the repository 8
VcsDriverInterface::hasComposerFile public function Return true if the repository has a composer file for a given identifier,
false otherwise.
1
VcsDriverInterface::initialize public function Initializes the driver (git clone, svn checkout, fetch info etc) 8
VcsDriverInterface::supports public static function Checks if this driver can handle a given url 8

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal