original_string: public function getHandler($name)
      {
          $handlers = $this->getHandlers();
  
          if (strpos($name, '.') !== 0) {
              return isset($handlers[$name]) ? $handlers[$name] : array();
          }
  
          $extension = ltrim($name, '.');
  
          foreach ($handlers as $handler) {
  
              if (empty($handler['extensions'])) {
                  continue;
              }
  
              foreach ((array) $handler['extensions'] as $allowed_extension) {
                  if ($extension === $allowed_extension) {
                      return $handler;
                  }
              }
          }
  
          return array();
      }
code: public function getHandler($name)
      {
          $handlers = $this->getHandlers();
  
          if (strpos($name, '.') !== 0) {
              return isset($handlers[$name]) ? $handlers[$name] : array();
          }
  
          $extension = ltrim($name, '.');
  
          foreach ($handlers as $handler) {
  
              if (empty($handler['extensions'])) {
                  continue;
              }
  
              foreach ((array) $handler['extensions'] as $allowed_extension) {
                  if ($extension === $allowed_extension) {
                      return $handler;
                  }
              }
          }
  
          return array();
      }
code_tokens: public function getHandler ( $ name ) { $ handlers = $ this -> getHandlers ( ) ; if ( strpos ( $ name , '.' ) !== 0 ) { return isset ( $ handlers [ $ name ] ) ? $ handlers [ $ name ] : array ( ) ; } $ extension = ltrim ( $ name , '.' ) ; foreach ( $ handlers as $ handler ) { if ( empty ( $ handler [ 'extensions' ] ) ) { continue ; } foreach ( ( array ) $ handler [ 'extensions' ] as $ allowed_extension ) { if ( $ extension === $ allowed_extension ) { return $ handler ; } } } return array ( ) ; }
docstring: Returns a handler data
  @param string $name
  @return array
docstring_tokens: Returns a handler data