protected function parseVariables($value) { $self = $this; return preg_replace_callback('/\\[(\\w+)\\]/', function ($match) use(&$self) { return $self[$match[1]] ?: ''; }, $value); }