Skip to content

Commit

Permalink
Merge pull request #5 from mtudor/hotfix/fix-for-older-php
Browse files Browse the repository at this point in the history
Older versions of PHP do not support object dereferencing (instantiating...
  • Loading branch information
mtudor committed Mar 12, 2014
2 parents 1b9c71a + fba35e6 commit e5d572c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/TccAbstractModule/Module/AbstractModuleNoTraits.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ public function getViewHelperConfig()
*/
protected function getDir()
{
return dirname((new \ReflectionClass(get_class($this)))->getFileName());
$reflectionClass = new \ReflectionClass(get_class($this));
return dirname($reflectionClass->getFileName());
}

/**
Expand All @@ -177,6 +178,7 @@ protected function getDir()
*/
protected function getNamespace()
{
return (new \ReflectionClass(get_class($this)))->getNamespaceName();
$reflectionClass = new \ReflectionClass(get_class($this));
return dirname($reflectionClass->getNamespaceName());
}
}

0 comments on commit e5d572c

Please sign in to comment.