class SnippetCollection (View source)

The snippet collection.

Properties

static private $snippets An array for collection snippet definitions.

Methods

static 
add(string $name, string $body)

Add a snippet definition to the collection.

static string
get(string $name)

Get a snippet definition body.

static array
getCollection()

Get the full collection of snippet definitions.

Details

static add(string $name, string $body)

Add a snippet definition to the collection.

Parameters

string $name
string $body

static string get(string $name)

Get a snippet definition body.

Parameters

string $name

Return Value

string the snippet body

static array getCollection()

Get the full collection of snippet definitions.

Return Value

array the array of snippet definitions.