Example #1
0
 /**
  * Platform-dependant string escape
  *
  * @param	string
  * @return	string
  */
 protected function _escape_str($str)
 {
     return str_replace("'", "''", Utf8::remove_invisible_characters($str));
 }
Example #2
0
 /**
  * Platform-dependant string escape
  *
  * @param	string
  * @return	string
  */
 protected function _escape_str($str)
 {
     return Utf8::remove_invisible_characters($str);
 }
Example #3
0
 /**
  * Set URI String
  *
  * @param 	string	$str
  * @return	void
  */
 protected function _set_uri_string($str)
 {
     // Filter out control characters and trim slashes
     $this->uri_string = trim(Utf8::remove_invisible_characters($str, FALSE), '/');
     if ($this->uri_string !== '') {
         // Remove the URL suffix, if present
         if (($suffix = (string) $this->config->url_suffix) !== '') {
             $slen = strlen($suffix);
             if (substr($this->uri_string, -$slen) === $suffix) {
                 $this->uri_string = substr($this->uri_string, 0, -$slen);
             }
         }
         $this->segments[0] = NULL;
         // Populate the segments array
         foreach (explode('/', trim($this->uri_string, '/')) as $val) {
             $val = trim($val);
             // Filter segments for security
             $this->filter_uri($val);
             if ($val !== '') {
                 $this->segments[] = $val;
             }
         }
         unset($this->segments[0]);
     }
 }