original_string: protected function convert($data)
      {
          if ($data instanceof DateTime) {
              $data = clone $data; // don't change to original value
              return $data->setTimezone($this->timezone)->format('Y-m-d\TG:i:s\Z');
          }
  
          if (is_object($data) && !method_exists($data, '__toString')) {
              return null; // can't convert object to a string.
          }
  
          if (is_array($data)) {
              return null; // can't convert a array to a string.
          }
  
          if (is_bool($data)) {
              return $data ? '1' : '0'; // would otherwise be empty if converted to a string
          }
  
          return $data !== null ? (string)$data : null;
      }
code: protected function convert($data)
      {
          if ($data instanceof DateTime) {
              $data = clone $data; // don't change to original value
              return $data->setTimezone($this->timezone)->format('Y-m-d\TG:i:s\Z');
          }
  
          if (is_object($data) && !method_exists($data, '__toString')) {
              return null; // can't convert object to a string.
          }
  
          if (is_array($data)) {
              return null; // can't convert a array to a string.
          }
  
          if (is_bool($data)) {
              return $data ? '1' : '0'; // would otherwise be empty if converted to a string
          }
  
          return $data !== null ? (string)$data : null;
      }
code_tokens: protected function convert ( $ data ) { if ( $ data instanceof DateTime ) { $ data = clone $ data ; // don't change to original value return $ data -> setTimezone ( $ this -> timezone ) -> format ( 'Y-m-d\TG:i:s\Z' ) ; } if ( is_object ( $ data ) && ! method_exists ( $ data , '__toString' ) ) { return null ; // can't convert object to a string. } if ( is_array ( $ data ) ) { return null ; // can't convert a array to a string. } if ( is_bool ( $ data ) ) { return $ data ? '1' : '0' ; // would otherwise be empty if converted to a string } return $ data !== null ? ( string ) $ data : null ; }
docstring: Convert the data to a string.
  
  If the value can not be converted to a string then return null.
  
  @param mixed $data
  
  @return null | string
docstring_tokens: Convert the data to a string .