diff --git a/Classes/Fusion/Implementation.php b/Classes/Fusion/Implementation.php index cd81100..812db31 100644 --- a/Classes/Fusion/Implementation.php +++ b/Classes/Fusion/Implementation.php @@ -57,9 +57,9 @@ public function getThreshold() return $this->fusionValue('threshold'); } - public function getThrowExeption() + public function getThrowException() { - return $this->fusionValue('throwExeption'); + return $this->fusionValue('throwException'); } public function texFileExists(string $language): bool @@ -87,13 +87,13 @@ public function evaluate() if (!$this->texFileExists($language)) { $firstPartOfLanguage = explode('-', $language)[0]; if ($firstPartOfLanguage === $language) { - if ($this->getThrowExeption()) { + if ($this->getThrowException()) { throw new \Exception("Hyphen definition for '$language' is not available", 1614949800); } return $this->getContent(); } if (!$this->texFileExists($firstPartOfLanguage)) { - if ($this->getThrowExeption()) { + if ($this->getThrowException()) { throw new \Exception("Hyphen definition for '$firstPartOfLanguage' is not available", 1614949900); } return $this->getContent(); diff --git a/README.md b/README.md index 7d12aaf..c4c8e9d 100755 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ prototype(Foo.Bar:Component) { **threshold** (integer, default = `0`) : Minimum amount characters a word needs to have, before it is being hyphenated. -**throwExeption** (boolean, default = `true`) : Throw Exeption if no hyphen definition is found +**throwException** (boolean, default = `true`) : Throw exception if no hyphen definition is found ## Credits diff --git a/Resources/Private/Fusion/Root.fusion b/Resources/Private/Fusion/Root.fusion index d3c4ef1..f656086 100644 --- a/Resources/Private/Fusion/Root.fusion +++ b/Resources/Private/Fusion/Root.fusion @@ -4,8 +4,8 @@ prototype(Carbon.Hyphen:Component) < prototype(Neos.Fusion:Component) { locale = null threshold = 0 - // Throw Exeption if no hyphen definition is found - throwExeption = true + // Throw exception if no hyphen definition is found + throwException = true inBackend = ${documentNode.context.inBackend} @@ -16,7 +16,7 @@ prototype(Carbon.Hyphen:Component) < prototype(Neos.Fusion:Component) { type={props.type} locale={props.locale} threshold={props.threshold} - throwExeption={props.throwExeption} + throwException={props.throwException} content={props.content} /> `