]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/symfony/intl/Symfony/Component/Intl/Util/SvnCommit.php
twig implementation
[github/wallabag/wallabag.git] / vendor / symfony / intl / Symfony / Component / Intl / Util / SvnCommit.php
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Intl\Util;
13
14 /**
15 * An SVN commit.
16 *
17 * @author Bernhard Schussek <bschussek@gmail.com>
18 */
19 class SvnCommit
20 {
21 /**
22 * @var \SimpleXMLElement
23 */
24 private $svnInfo;
25
26 /**
27 * Creates a commit from the given "svn info" data.
28 *
29 * @param \SimpleXMLElement $svnInfo The XML result from the "svn info"
30 * command.
31 */
32 public function __construct(\SimpleXMLElement $svnInfo)
33 {
34 $this->svnInfo = $svnInfo;
35 }
36
37 /**
38 * Returns the revision of the commit.
39 *
40 * @return string The revision of the commit.
41 */
42 public function getRevision()
43 {
44 return (string) $this->svnInfo['revision'];
45 }
46
47 /**
48 * Returns the author of the commit.
49 *
50 * @return string The author name.
51 */
52 public function getAuthor()
53 {
54 return (string) $this->svnInfo->author;
55 }
56
57 /**
58 * Returns the date of the commit.
59 *
60 * @return string The commit date.
61 */
62 public function getDate()
63 {
64 return (string) $this->svnInfo->date;
65 }
66 }