Commit 6e3d856 1 parent 58df424 commit 6e3d856 Copy full SHA for 6e3d856
File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -125,20 +125,26 @@ should choose the fastest analyzer that supports the features you need.
125
125
<td>--</td>
126
126
</tr>
127
127
<tr>
128
- <th >Performance</th >
129
- <th ><em>Slow</em></th >
130
- <th ><em>Fast</em></th >
128
+ <td >Performance</td >
129
+ <td ><em>Slow</em></td >
130
+ <td ><em>Fast</em></td >
131
131
</tr>
132
132
</tbody >
133
133
</table >
134
134
135
- You can choose the analyzer you want to use when you instantiate the ` Serializer ` .
135
+ You can choose the analyzer you want to use when you instantiate the
136
+ ` Serializer ` . If you do not specify one, the ` AstAnalyzer ` is used by default,
137
+ since it has the most capabilities.
136
138
137
139
``` php
138
140
use SuperClosure\Serializer;
139
141
use SuperClosure\Analyzer\AstAnalyzer;
140
142
use SuperClosure\Analyzer\TokenAnalyzer;
141
143
144
+ // Use the default analyzer.
145
+ $serializer = new Serializer();
146
+
147
+ // Explicitly choose an analyzer.
142
148
$serializer = new Serializer(new AstAnalyzer());
143
149
// OR
144
150
$serializer = new Serializer(new TokenAnalyzer());
You can’t perform that action at this time.
0 commit comments