コード例 #1
0
ファイル: Link.php プロジェクト: Nycto/Round-Eights
 /**
  * Returns whether a query is an INSERT query
  *
  * @param String $query The query being tested
  * @return Boolean
  */
 public static function isInsert($query)
 {
     $query = (string) $query;
     $query = \r8\str\stripQuoted($query, array("'", '"', "`"));
     $query = trim($query);
     return preg_match("/^\\s*INSERT\\b/i", $query) ? TRUE : FALSE;
 }
コード例 #2
0
ファイル: strings.php プロジェクト: Nycto/Round-Eights
 public function testStripQuoted()
 {
     $this->assertEquals("This  with quotes", \r8\str\stripQuoted("This 'is a string' with\"\" quotes"));
     $this->assertEquals("This  withot", \r8\str\stripQuoted("This /is a string& with/ qu&ot&es", array('/', '&')));
 }