Open jeff-pruvio opened 4 years ago
protected function makeSomeText() { $php = LightnCandy\LightnCandy::compile($html, array( 'helpers' => array( "flags": LightnCandy\LightnCandy::FLAG_HANDLEBARS, "story"=>function($identifier, $options) { return $this->getTextForResponse($identifier); } ) ) ); }
This doesn't work for me (PHP doesn't like it - referencing $this in a non-object context), and I can't find anything in the documentation about calling a class instance method in a helper.
The PHP Code:
protected function makeSomeText() { $php = LightnCandy\LightnCandy::compile($html, array( 'helpers' => array( "flags": LightnCandy\LightnCandy::FLAG_HANDLEBARS, "story"=>function($identifier, $options) { return $this->getTextForResponse($identifier); } ) ) ); }
The Issue:
This doesn't work for me (PHP doesn't like it - referencing $this in a non-object context), and I can't find anything in the documentation about calling a class instance method in a helper.