Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public static function create() |
||
25 | { |
||
26 | $cache = new Filesystem(); |
||
27 | $cache->setOptions( |
||
28 | [ |
||
29 | 'namespace' => 'phpdoc-cache', |
||
30 | 'cache_dir' => sys_get_temp_dir(), |
||
31 | ] |
||
32 | ); |
||
33 | $plugin = new SerializerPlugin(); |
||
34 | |||
35 | if (extension_loaded('igbinary')) { |
||
36 | $options = new PluginOptions(); |
||
37 | $options->setSerializer('igbinary'); |
||
38 | |||
39 | $plugin->setOptions($options); |
||
40 | } |
||
41 | |||
42 | $cache->addPlugin($plugin); |
||
43 | |||
44 | return $cache; |
||
45 | } |
||
46 | } |
||
47 |