src/TwigExtension/ExtensionLoader.php
static protected function load($type, $file) {
    include $file;
    switch ($type) {
      case 'filters':
        self::$objects['filters'][] = $filter;
        break;
      case 'functions':
        self::$objects['functions'][] = $function;
        break;
      case 'tags':
        if (preg_match('/^([^\.]+)\.tag\.php$/', basename($file), $matches)) {
          $class = "Project_{$matches[1]}_TokenParser";
          if (class_exists($class)) {
            self::$objects['parsers'][] = new $class();
          }
        }
        break;
    }
  }
static protected function load($type, $file) {
    include $file;
    switch ($type) {
      case 'filters':
        self::$objects['filters'][] = $filter;
        break;
      case 'functions':
        self::$objects['functions'][] = $function;
        break;
      case 'tags':
        if (preg_match('/^([^\.]+)\.tag\.php$/', basename($file), $matches)) {
          $class = "Project_{$matches[1]}_TokenParser";
          if (class_exists($class)) {
            self::$objects['parsers'][] = new $class();
          }
        }
        break;
    }
  }
static protected function load ( $ type , $ file ) { include $ file ; switch ( $ type ) { case 'filters' : self :: $ objects [ 'filters' ] [ ] = $ filter ; break ; case 'functions' : self :: $ objects [ 'functions' ] [ ] = $ function ; break ; case 'tags' : if ( preg_match ( '/^([^\.]+)\.tag\.php$/' , basename ( $ file ) , $ matches ) ) { $ class = "Project_{$matches[1]}_TokenParser" ; if ( class_exists ( $ class ) ) { self :: $ objects [ 'parsers' ] [ ] = new $ class ( ) ; } } break ; } }
Loads a specific plugin instance.

@param string $type
The type of the plugin to be loaded.
@param string $file
The fully qualified path of the plugin to be loaded.
Loads a specific plugin instance .