Code: Select all
$this->aVar['Template']->get('MyTest') == 'test' ? $Template.get('MyTest') : $Template.get('MyTest')Its to go in a preg_replace, but I've been trying to make it work with preg_match_all while trying to figure it out:
Code: Select all
if (preg_match_all('@\$([^\s]*)@S', $aAttr[$sKey], $aMatches)) {
var_dump($aAttr[$sKey], $aMatches);
}Code: Select all
array
0 =>
array
0 => '$this->aVar['Template']->get('MyTest')'
1 => '$Template.get('MyTest')'
2 => '$Template.get('MyTest')'
1 =>
array
0 => 'this->aVar['Template']->get('MyTest')'
1 => 'Template.get('MyTest')'
2 => 'Template.get('MyTest')'