original_string: public function insert(array $data)
      {
          $params = array();
          $query = "INSERT INTO $this->_name (";
  
          foreach ($data as $key => $value) {
              $query .= "$key, ";
  
          }
  
          $query = substr($query, 0, -2);
          $query .= ") VALUES (";
  
          $iValue = 0;
          foreach ($data as $key => $value) {
              $query .= ":value$iValue, ";
              $params[":value$iValue"] = $value;
              $iValue++;
          }
  
          $query = substr($query, 0, -2);
          $query .= ")";
  
          return $this->_insert($query, $params);
      }
code: public function insert(array $data)
      {
          $params = array();
          $query = "INSERT INTO $this->_name (";
  
          foreach ($data as $key => $value) {
              $query .= "$key, ";
  
          }
  
          $query = substr($query, 0, -2);
          $query .= ") VALUES (";
  
          $iValue = 0;
          foreach ($data as $key => $value) {
              $query .= ":value$iValue, ";
              $params[":value$iValue"] = $value;
              $iValue++;
          }
  
          $query = substr($query, 0, -2);
          $query .= ")";
  
          return $this->_insert($query, $params);
      }
code_tokens: public function insert ( array $ data ) { $ params = array ( ) ; $ query = "INSERT INTO $this->_name (" ; foreach ( $ data as $ key => $ value ) { $ query .= "$key, " ; } $ query = substr ( $ query , 0 , - 2 ) ; $ query .= ") VALUES (" ; $ iValue = 0 ; foreach ( $ data as $ key => $ value ) { $ query .= ":value$iValue, " ; $ params [ ":value$iValue" ] = $ value ; $ iValue ++ ; } $ query = substr ( $ query , 0 , - 2 ) ; $ query .= ")" ; return $ this -> _insert ( $ query , $ params ) ; }
docstring: Create new row
  @param array $data Array with data ('column_name' => 'foo')
  @return \Core\Orm\RowGateway | bool
docstring_tokens: Create new row