Skip to content

Commit

Permalink
Corrected and detailed the section about the addSymbol() method
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskonnertz committed Apr 5, 2018
1 parent 1951313 commit 35a97ee
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 35a97ee

Please sign in to comment.