4 * This file is part of the Behat.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Behat\Definition\Translator;
13 use Behat\Behat\Definition\Definition;
16 * Represents definition translated to the specific language.
18 * @author Konstantin Kudryashov <ever.zet@gmail.com>
20 final class TranslatedDefinition implements Definition
29 private $translatedPattern;
36 * Initialises translated definition.
38 * @param Definition $definition
39 * @param string $translatedPattern
40 * @param string $language
42 public function __construct(Definition $definition, $translatedPattern, $language)
44 $this->definition = $definition;
45 $this->translatedPattern = $translatedPattern;
46 $this->language = $language;
52 public function getType()
54 return $this->definition->getType();
60 public function getPattern()
62 return $this->translatedPattern;
66 * Returns original (not translated) pattern.
70 public function getOriginalPattern()
72 return $this->definition->getPattern();
76 * Returns language definition was translated to.
80 public function getLanguage()
82 return $this->language;
88 public function getDescription()
90 return $this->definition->getDescription();
96 public function getPath()
98 return $this->definition->getPath();
104 public function isAMethod()
106 return $this->definition->isAMethod();
112 public function isAnInstanceMethod()
114 return $this->definition->isAnInstanceMethod();
120 public function getCallable()
122 return $this->definition->getCallable();
128 public function getReflection()
130 return $this->definition->getReflection();
136 public function __toString()
138 return $this->definition->__toString();