original_string: public function escape($value = null, array $doNotEscape = [])
      {
          $this->doNotEscape = \array_unique(\array_merge($this->doNotEscape, $doNotEscape));
  
          if (\is_null($value)) {
              return 'NULL';
          }
          if (\is_int($value) || \is_float($value)) {
              return $value;
          }
          if (\is_array($value) || \is_object($value)) {
              return $this->dbClass->escape(\serialize($value));
          }
  
          foreach ($this->doNotEscape as $doNotEscape) {
              if (\preg_match('/^'.\str_replace('*', '\\*', $doNotEscape).'/i', (string)$value)) {
                  return $value;
              }
          }
          return $this->dbClass->escape($value);
      }
code: public function escape($value = null, array $doNotEscape = [])
      {
          $this->doNotEscape = \array_unique(\array_merge($this->doNotEscape, $doNotEscape));
  
          if (\is_null($value)) {
              return 'NULL';
          }
          if (\is_int($value) || \is_float($value)) {
              return $value;
          }
          if (\is_array($value) || \is_object($value)) {
              return $this->dbClass->escape(\serialize($value));
          }
  
          foreach ($this->doNotEscape as $doNotEscape) {
              if (\preg_match('/^'.\str_replace('*', '\\*', $doNotEscape).'/i', (string)$value)) {
                  return $value;
              }
          }
          return $this->dbClass->escape($value);
      }
code_tokens: public function escape ( $ value = null , array $ doNotEscape = [ ] ) { $ this -> doNotEscape = \ array_unique ( \ array_merge ( $ this -> doNotEscape , $ doNotEscape ) ) ; if ( \ is_null ( $ value ) ) { return 'NULL' ; } if ( \ is_int ( $ value ) || \ is_float ( $ value ) ) { return $ value ; } if ( \ is_array ( $ value ) || \ is_object ( $ value ) ) { return $ this -> dbClass -> escape ( \ serialize ( $ value ) ) ; } foreach ( $ this -> doNotEscape as $ doNotEscape ) { if ( \ preg_match ( '/^' . \ str_replace ( '*' , '\\*' , $ doNotEscape ) . '/i' , ( string ) $ value ) ) { return $ value ; } } return $ this -> dbClass -> escape ( $ value ) ; }
docstring: Escapes value using database specific method
  
  @param mixed|null $value
  @param array      $doNotEscape
  @return mixed
docstring_tokens: Escapes value using database specific method