original_string: public static function insert($string, array $data, array $options = array()) {
          $options = $options + array(
              'before' => '{',
              'after' => '}',
              'escape' => true
          );
  
          foreach ($data as $key => $value) {
              $string = str_replace($options['before'] . $key . $options['after'], $value, $string);
          }
  
          if ($options['escape']) {
              $string = Sanitize::escape($string);
          }
  
          return $string;
      }
code: public static function insert($string, array $data, array $options = array()) {
          $options = $options + array(
              'before' => '{',
              'after' => '}',
              'escape' => true
          );
  
          foreach ($data as $key => $value) {
              $string = str_replace($options['before'] . $key . $options['after'], $value, $string);
          }
  
          if ($options['escape']) {
              $string = Sanitize::escape($string);
          }
  
          return $string;
      }
code_tokens: public static function insert ( $ string , array $ data , array $ options = array ( ) ) { $ options = $ options + array ( 'before' => '{' , 'after' => '}' , 'escape' => true ) ; foreach ( $ data as $ key => $ value ) { $ string = str_replace ( $ options [ 'before' ] . $ key . $ options [ 'after' ] , $ value , $ string ) ; } if ( $ options [ 'escape' ] ) { $ string = Sanitize :: escape ( $ string ) ; } return $ string ; }
docstring: Insert values into a string defined by an array of key tokens.
  
  @uses Titon\Utility\Sanitize
  
  @param string $string
  @param array $data
  @param array $options {
  @type string $before    Opening variable delimiter
  @type string $after     Closing variable delimiter
  @type bool $escape      Escape the string
  }
  @return string
docstring_tokens: Insert values into a string defined by an array of key tokens .