public function addSnippets(array $snippets = null) {

        // register default snippets
        $this->add(new DefaultSnippets());

        if(!is_null($snippets)) {
            foreach ($snippets as $snippet=>$definition) {
                if ($definition instanceof Snippets) {
                    $this->add($definition);
                } else {
                    $this->add($snippet, $definition);
                }
            }
        }
    }
public function addSnippets(array $snippets = null) {

        // register default snippets
        $this->add(new DefaultSnippets());

        if(!is_null($snippets)) {
            foreach ($snippets as $snippet=>$definition) {
                if ($definition instanceof Snippets) {
                    $this->add($definition);
                } else {
                    $this->add($snippet, $definition);
                }
            }
        }
    }
public function addSnippets ( array $ snippets = null ) { // register default snippets $ this -> add ( new DefaultSnippets ( ) ) ; if ( ! is_null ( $ snippets ) ) { foreach ( $ snippets as $ snippet => $ definition ) { if ( $ definition instanceof Snippets ) { $ this -> add ( $ definition ) ; } else { $ this -> add ( $ snippet , $ definition ) ; } } } }
Adds snippets so that the SnippetParser has snippets to parse and render.

@param array $settings    an array of snippets
Adds snippets so that the SnippetParser has snippets to parse and render .