本文整理汇总了PHP中Package::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::__construct方法的具体用法?PHP Package::__construct怎么用?PHP Package::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($release, $address, $desc, $doc)
{
parent::__construct($release, $address, $desc, $doc);
$this->installed = $this->installed();
$this->localPath = $this->localPath();
$this->updateAvailable = $this->updateAvailable();
$this->deleteLink = '&delete=' . $this->name;
}
示例2: __construct
public function __construct($release, $address, $desc, $doc)
{
parent::__construct($release, $address, $desc, $doc);
$this->installed = true;
$this->localPath = dirname(dirname(dirname(__DIR__)));
$this->name = $this::CORE_NAME;
$this->updateAvailable = $this->updateAvailable();
}
示例3: __construct
/**
* Constructor.
*
* @param string|array $baseUrls Base asset URLs
* @param string $version The package version
* @param string $format The format used to apply the version
*/
public function __construct($baseUrls = array(), $version = null, $format = null)
{
parent::__construct($version, $format);
if (!is_array($baseUrls)) {
$baseUrls = (array) $baseUrls;
}
$this->baseUrls = array();
foreach ($baseUrls as $baseUrl) {
$this->baseUrls[] = rtrim($baseUrl, '/');
}
}
示例4: __construct
/**
* Constructor.
*
* @param string $basePath The base path to be prepended to relative paths
* @param string $version The package version
* @param string $format The format used to apply the version
*/
public function __construct($basePath = null, $version = null, $format = null)
{
parent::__construct($version, $format);
if (!$basePath) {
$this->basePath = '/';
} else {
if ('/' != $basePath[0]) {
$basePath = '/' . $basePath;
}
$this->basePath = rtrim($basePath, '/') . '/';
}
}
示例5: RuntimeException
/**
* Contsructor opens the file
* @param location of the file
* @param distribution the package is built for (used on version numbers)
*/
function __construct($location = null, $distribution = '')
{
parent::__construct();
if (!isset($this->location)) {
return false;
} else {
$this->location = $location;
$this->distribution = $distribution;
if (is_resource($location) && get_resource_type($location) == 'stream') {
$this->handle = $location;
} else {
$this->handle = @fopen($this->location, 'r');
if (!$this->handle) {
throw new RuntimeException('Opening file: ' . $location . " failed\n");
}
}
}
}
示例6: __construct
/**
* Creates a new root package.
*
* @param RootPackageFile $packageFile The package file.
* @param string $installPath The absolute install path.
*/
public function __construct(RootPackageFile $packageFile, $installPath)
{
parent::__construct($packageFile, $installPath);
}
示例7: __construct
/**
* Initialiser le paquet.
* @param Webos $webos Le webos.
* @param LocalRepository $repository Le depot sur lequel est le paquet.
* @param string $name Le nom du paquet.
*/
public function __construct(\lib\Webos $webos, LocalRepository $repository, $name)
{
//On appelle le constructeur du parent
parent::__construct($webos, $repository, $name);
$this->source = $repository->getSource() . '/packages/' . $name . '.xml';
}
示例8:
/**
* Constructs a new dependency object
* @param string name of the package
* @param string constraint constraint to the version
* @param string version of the package
*/
function __construct($name = '', $constraint = '', $version = '')
{
parent::__construct($name, $version);
$this->constraint = $constraint;
$this->debug('New dependency object: ' . $this->name . '' . $this->constraint . ' ' . $this->version);
}
示例9: __construct
public function __construct(Repository $repository, \lib\entities\PackageMetadata $metadata, $files)
{
parent::__construct($repository, $metadata);
$this->files = $files;
}