herrera-io / service-update
此包已被废弃,不再维护。未建议替换包。
Phar Update 库的服务提供商。
1.0.3
2013-03-22 23:22 UTC
Requires
- php: >=5.3.3
- herrera-io/phar-update: 1.*
- herrera-io/service-container: 1.*
Requires (Dev)
- herrera-io/phpunit-test-case: 1.*
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2021-12-07 01:35:55 UTC
README
Phar Update 库的服务提供商。
摘要
将Phar Update库集成到Herrera.io 服务容器中。
安装
将其添加到Composer依赖列表中
$ composer require herrera-io/service-update=1.*
使用
<?php use Herrera\Service\Container; use Herrera\Service\Update\UpdateServiceProvider; $container = new Container(); $container->register(new UpdateServiceProvider(), array( 'update.url' => 'https://example.com/manifest.json' )); /** @var $manager Herrera\Phar\Update\Manager */ $manager = $container['update.manager']; /** @var $manifest Herrera\Phar\Update\Manifest */ $manifest = $container['update.manifest']; /** * Updates the running Phar. * * @param string $version The current version. * @param boolean $major Lock to current major version? * @param boolean $pre Allow updates to pre-releases? */ $callable = $container['update'];