本文整理汇总了PHP中modPackageBuilder::getSignature方法的典型用法代码示例。如果您正苦于以下问题:PHP modPackageBuilder::getSignature方法的具体用法?PHP modPackageBuilder::getSignature怎么用?PHP modPackageBuilder::getSignature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modPackageBuilder
的用法示例。
在下文中一共展示了modPackageBuilder::getSignature方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
flush();
$builder->putVehicle($vehicle);
/* now pack in the license file, readme and setup options */
$builder->setPackageAttributes(array('changelog' => file_get_contents($sources['docs'] . 'changelog.txt'), 'license' => file_get_contents($sources['docs'] . 'license.txt'), 'readme' => file_get_contents($sources['docs'] . 'readme.txt'), 'chunks' => $BUILD_CHUNKS, 'setup-options' => array('source' => $sources['build'] . 'setup.options.php')));
$modx->log(modX::LOG_LEVEL_INFO, 'Added package attributes and setup options.');
/* zip up package */
$modx->log(modX::LOG_LEVEL_INFO, 'Packing up transport package zip...');
$builder->pack();
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$tend = $mtime;
$totalTime = $tend - $tstart;
$totalTime = sprintf("%2.4f s", $totalTime);
$signature = $builder->getSignature();
if (defined('PKG_AUTO_INSTALL') && PKG_AUTO_INSTALL) {
$sig = explode('-', $signature);
$versionSignature = explode('.', $sig[1]);
/* @var modTransportPackage $package */
if (!($package = $modx->getObject('transport.modTransportPackage', array('signature' => $signature)))) {
$package = $modx->newObject('transport.modTransportPackage');
$package->set('signature', $signature);
$package->fromArray(array('created' => date('Y-m-d h:i:s'), 'updated' => null, 'state' => 1, 'workspace' => 1, 'provider' => 0, 'source' => $signature . '.transport.zip', 'package_name' => $sig[0], 'version_major' => $versionSignature[0], 'version_minor' => !empty($versionSignature[1]) ? $versionSignature[1] : 0, 'version_patch' => !empty($versionSignature[2]) ? $versionSignature[2] : 0));
if (!empty($sig[2])) {
$r = preg_split('/([0-9]+)/', $sig[2], -1, PREG_SPLIT_DELIM_CAPTURE);
if (is_array($r) && !empty($r)) {
$package->set('release', $r[0]);
$package->set('release_index', isset($r[1]) ? $r[1] : '0');
} else {
$package->set('release', $sig[2]);