new Snippet()
Creates a new snippet
new Snippet(string|null $file, array $data = [ ])
Parameters
Name | Type | Default | Description |
---|---|---|---|
$file | string ornull |
no default value | Full path to the PHP file of the snippet; can be null for "dummy" snippetsthat don't exist |
$data | array |
[ ]
|
Associative array with variables that will be set inside the snippet |