CoreFiles by mySites.guru
PharInvocation.php77 lines, 1,527 bytes, from Joomla_3.9.6-rc-Release_Candidate-Full_Package.zip
Raw History Compare with 3.9.5-rc
md5
f714c84880092dfff2054acbf1a7c81d
sha1
2df0b19c767ebf0d3a89ba864bef86c1493cee2d
sha256
e9e50f11ab1c1f6d66d0a82583b422aaecebaf59624448da58e1d0acadf5660a
<?php
namespace TYPO3\PharStreamWrapper\Resolver;

/*
 * This file is part of the TYPO3 project.
 *
 * It is free software; you can redistribute it and/or modify it under the terms
 * of the MIT License (MIT). For the full copyright and license information,
 * please read the LICENSE file that was distributed with this source code.
 *
 * The TYPO3 project - inspiring people to share!
 */

use TYPO3\PharStreamWrapper\Exception;

class PharInvocation
{
    /**
     * @var string
     */
    private $baseName;

    /**
     * @var string
     */
    private $alias;

    /**
     * @param string $baseName
     * @param string $alias
     */
    public function __construct($baseName, $alias = '')
    {
        if ($baseName === '') {
            throw new Exception(
                'Base-name cannot be empty',
                1551283689
            );
        }
        $this->baseName = $baseName;
        $this->alias = $alias;
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return $this->baseName;
    }

    /**
     * @return string
     */
    public function getBaseName()
    {
        return $this->baseName;
    }

    /**
     * @return null|string
     */
    public function getAlias()
    {
        return $this->alias;
    }

    /**
     * @param PharInvocation $other
     * @return bool
     */
    public function equals(PharInvocation $other)
    {
        return $other->baseName === $this->baseName
            && $other->alias === $this->alias;
    }
}

The same content is in 5 releases, Joomla 3.9.4-rc to 3.9.6-rc. See them all, or every version of this file.