Created
April 27, 2016 17:48
-
-
Save daum/2c8c314aee01d50d7350e32d2c736fcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function __call($method, $arguments) | |
{ | |
// If arguments are passed can't use the property accessor, so no free obj.name in twig. | |
if(count($arguments)) | |
return $this->proxyCurrentLocaleTranslation($method, $arguments); | |
else | |
return \Symfony\Component\PropertyAccess\PropertyAccess::createPropertyAccessor()->getValue($this->translate(), $method); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment