From 35a97ee3d5ba261c152b78a88a43d3815528b76f Mon Sep 17 00:00:00 2001 From: Christoph K Date: Thu, 5 Apr 2018 22:25:15 +0200 Subject: [PATCH] Corrected and detailed the section about the addSymbol() method --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7597b3..8a40e64 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,16 @@ If you want to use this parameter you have to pass the full name of the class th Example: ```php -$symbol = new ExampleClassOne(); +class ExampleClassOne extends AbstractConstant +{ + protected $identifiers = ['exampleConst']; + + protected $value = 123; +} + +// The AbstractSymbol clas has this dependency: +$stringHelper = $container->get('stringcalc_stringhelper'); +$symbol = new ExampleClassOne($stringHelper); $replaceSymbol = ExampleClassTwo::class; $stringCalc->addSymbol($symbol, $replaceSymbol);