public function getSnippet($filename, array $extraSourceParameters = null)
    {
        try {
            $this->addRegistryContainer($extraSourceParameters, 'tmpContainer');
            $snippet = $this->_loadClass($filename, true);
            $this->removeRegistryContainer('tmpContainer');
            if (self::$verbose) {
                \MUtil_Echo::r('Loading snippet ' . $filename . '<br/>' . 'Using snippet: ' . get_class($snippet));
               }
        } catch (\Exception $exc) {
            if (self::$verbose) {
                \MUtil_Echo::r($exc->getMessage(), __CLASS__ . '->' .  __FUNCTION__ . '(' . $filename . ')');
            }
            throw $exc;
        }

        return $snippet;
    }
public function getSnippet($filename, array $extraSourceParameters = null)
    {
        try {
            $this->addRegistryContainer($extraSourceParameters, 'tmpContainer');
            $snippet = $this->_loadClass($filename, true);
            $this->removeRegistryContainer('tmpContainer');
            if (self::$verbose) {
                \MUtil_Echo::r('Loading snippet ' . $filename . '<br/>' . 'Using snippet: ' . get_class($snippet));
               }
        } catch (\Exception $exc) {
            if (self::$verbose) {
                \MUtil_Echo::r($exc->getMessage(), __CLASS__ . '->' .  __FUNCTION__ . '(' . $filename . ')');
            }
            throw $exc;
        }

        return $snippet;
    }
public function getSnippet ( $ filename , array $ extraSourceParameters = null ) { try { $ this -> addRegistryContainer ( $ extraSourceParameters , 'tmpContainer' ) ; $ snippet = $ this -> _loadClass ( $ filename , true ) ; $ this -> removeRegistryContainer ( 'tmpContainer' ) ; if ( self :: $ verbose ) { \ MUtil_Echo :: r ( 'Loading snippet ' . $ filename . '<br/>' . 'Using snippet: ' . get_class ( $ snippet ) ) ; } } catch ( \ Exception $ exc ) { if ( self :: $ verbose ) { \ MUtil_Echo :: r ( $ exc -> getMessage ( ) , __CLASS__ . '->' . __FUNCTION__ . '(' . $ filename . ')' ) ; } throw $ exc ; } return $ snippet ; }
Searches and loads a .php snippet file.

@param string $filename The name of the snippet
@param array $extraSourceParameters name/value pairs to add to the source for this snippet
@return \MUtil_Snippets_SnippetInterface The snippet
Searches and loads a . php snippet file .