You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2KB

  1. <?php
  2. /*
  3. * This file is part of the Fxp Composer Asset Plugin package.
  4. *
  5. * (c) François Pluchino <francois.pluchino@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Fxp\Composer\AssetPlugin\Repository\Vcs;
  11. use Composer\Cache;
  12. use Composer\Repository\Vcs\HgBitbucketDriver as BaseHgBitbucketDriver;
  13. /**
  14. * Mercurial Bitbucket Bitbucket vcs driver.
  15. *
  16. * @author François Pluchino <francois.pluchino@gmail.com>
  17. */
  18. class HgBitbucketDriver extends BaseHgBitbucketDriver
  19. {
  20. /**
  21. * @var Cache
  22. */
  23. protected $cache;
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function initialize()
  28. {
  29. parent::initialize();
  30. $this->cache = new Cache($this->io, $this->config->get('cache-repo-dir').'/'.$this->originUrl.'/'.$this->owner.'/'.$this->repository);
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function getComposerInformation($identifier)
  36. {
  37. return BitbucketUtil::getComposerInformation($this->cache, $this->infoCache, $this->getScheme(), $this->repoConfig, $identifier, $this->owner, $this->repository, $this, 'getContents');
  38. }
  39. }