aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/intl/Symfony/Component/Intl/Util/SvnCommit.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/intl/Symfony/Component/Intl/Util/SvnCommit.php')
-rw-r--r--vendor/symfony/intl/Symfony/Component/Intl/Util/SvnCommit.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/vendor/symfony/intl/Symfony/Component/Intl/Util/SvnCommit.php b/vendor/symfony/intl/Symfony/Component/Intl/Util/SvnCommit.php
new file mode 100644
index 00000000..483d92bc
--- /dev/null
+++ b/vendor/symfony/intl/Symfony/Component/Intl/Util/SvnCommit.php
@@ -0,0 +1,66 @@
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
12namespace Symfony\Component\Intl\Util;
13
14/**
15 * An SVN commit.
16 *
17 * @author Bernhard Schussek <bschussek@gmail.com>
18 */
19class 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}