original_string: protected function _operatorCallable($name)
      {
          $operator = $this->config("operators.{$name}");
  
          if ($operator) {
              $handler = $operator['handler'];
  
              if (is_callable($handler)) {
                  return function ($query, $token) use ($handler) {
                      return $handler($query, $token);
                  };
              } elseif ($handler instanceof BaseOperator) {
                  return function ($query, $token) use ($handler) {
                      return $handler->scope($query, $token);
                  };
              } elseif (is_string($handler) && method_exists($this->_table, $handler)) {
                  return function ($query, $token) use ($handler) {
                      return $this->_table->$handler($query, $token);
                  };
              } elseif (is_string($handler) && is_subclass_of($handler, '\Search\Operator\BaseOperator')) {
                  return function ($query, $token) use ($operator) {
                      $instance = new $operator['handler']($this->_table, $operator['options']);
  
                      return $instance->scope($query, $token);
                  };
              }
          }
  
          return false;
      }
code: protected function _operatorCallable($name)
      {
          $operator = $this->config("operators.{$name}");
  
          if ($operator) {
              $handler = $operator['handler'];
  
              if (is_callable($handler)) {
                  return function ($query, $token) use ($handler) {
                      return $handler($query, $token);
                  };
              } elseif ($handler instanceof BaseOperator) {
                  return function ($query, $token) use ($handler) {
                      return $handler->scope($query, $token);
                  };
              } elseif (is_string($handler) && method_exists($this->_table, $handler)) {
                  return function ($query, $token) use ($handler) {
                      return $this->_table->$handler($query, $token);
                  };
              } elseif (is_string($handler) && is_subclass_of($handler, '\Search\Operator\BaseOperator')) {
                  return function ($query, $token) use ($operator) {
                      $instance = new $operator['handler']($this->_table, $operator['options']);
  
                      return $instance->scope($query, $token);
                  };
              }
          }
  
          return false;
      }
code_tokens: protected function _operatorCallable ( $ name ) { $ operator = $ this -> config ( "operators.{$name}" ) ; if ( $ operator ) { $ handler = $ operator [ 'handler' ] ; if ( is_callable ( $ handler ) ) { return function ( $ query , $ token ) use ( $ handler ) { return $ handler ( $ query , $ token ) ; } ; } elseif ( $ handler instanceof BaseOperator ) { return function ( $ query , $ token ) use ( $ handler ) { return $ handler -> scope ( $ query , $ token ) ; } ; } elseif ( is_string ( $ handler ) && method_exists ( $ this -> _table , $ handler ) ) { return function ( $ query , $ token ) use ( $ handler ) { return $ this -> _table -> $ handler ( $ query , $ token ) ; } ; } elseif ( is_string ( $ handler ) && is_subclass_of ( $ handler , '\Search\Operator\BaseOperator' ) ) { return function ( $ query , $ token ) use ( $ operator ) { $ instance = new $ operator [ 'handler' ] ( $ this -> _table , $ operator [ 'options' ] ) ; return $ instance -> scope ( $ query , $ token ) ; } ; } } return false ; }
docstring: Gets the callable method for a given operator method.
  
  @param string $name Name of the method to get
  @return bool|callable False if no callback was found for the given operator
  name. Or the callable if found.
docstring_tokens: Gets the callable method for a given operator method .