HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: /virtual/nagasaki/public_html/ec/vendor/symfony/intl/Util/SvnCommit.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Intl\Util;

/**
 * An SVN commit.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
class SvnCommit
{
    /**
     * @var \SimpleXMLElement
     */
    private $svnInfo;

    /**
     * Creates a commit from the given "svn info" data.
     *
     * @param \SimpleXMLElement $svnInfo The XML result from the "svn info"
     *                                   command.
     */
    public function __construct(\SimpleXMLElement $svnInfo)
    {
        $this->svnInfo = $svnInfo;
    }

    /**
     * Returns the revision of the commit.
     *
     * @return string The revision of the commit
     */
    public function getRevision()
    {
        return (string) $this->svnInfo['revision'];
    }

    /**
     * Returns the author of the commit.
     *
     * @return string The author name
     */
    public function getAuthor()
    {
        return (string) $this->svnInfo->author;
    }

    /**
     * Returns the date of the commit.
     *
     * @return string The commit date
     */
    public function getDate()
    {
        return (string) $this->svnInfo->date;
    }
}