当前位置: 首页>>代码示例>>PHP>>正文


PHP modPackageBuilder::getSignature方法代码示例

本文整理汇总了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]);
开发者ID:Homchenkokostya,项目名称:simpleUpdater,代码行数:31,代码来源:build.transport.php


注:本文中的modPackageBuilder::getSignature方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。