original_string: public function setDataFor($arrValues)
      {
          $tableName = $this->getMetaModel()->getTableName();
          $colName   = $this->getColName();
          foreach ($arrValues as $id => $value) {
              if (null === $value) {
                  // The sort key be can remove in later version.
                  $value = ['bin' => [], 'value' => [], 'path' => [], 'sort' => null];
              }
  
              $files = ToolboxFile::convertValuesToDatabase($value);
  
              // Check single file or multiple file.
              if ($this->get('file_multiple')) {
                  $files = \serialize($files);
              } else {
                  $files = $files[0];
              }
  
              $this->connection->update(
                  $this->quoteReservedWord($tableName),
                  [$this->quoteReservedWord($colName) => $files],
                  [$this->quoteReservedWord('id') => $id]
              );
          }
      }
code: public function setDataFor($arrValues)
      {
          $tableName = $this->getMetaModel()->getTableName();
          $colName   = $this->getColName();
          foreach ($arrValues as $id => $value) {
              if (null === $value) {
                  // The sort key be can remove in later version.
                  $value = ['bin' => [], 'value' => [], 'path' => [], 'sort' => null];
              }
  
              $files = ToolboxFile::convertValuesToDatabase($value);
  
              // Check single file or multiple file.
              if ($this->get('file_multiple')) {
                  $files = \serialize($files);
              } else {
                  $files = $files[0];
              }
  
              $this->connection->update(
                  $this->quoteReservedWord($tableName),
                  [$this->quoteReservedWord($colName) => $files],
                  [$this->quoteReservedWord('id') => $id]
              );
          }
      }
code_tokens: public function setDataFor ( $ arrValues ) { $ tableName = $ this -> getMetaModel ( ) -> getTableName ( ) ; $ colName = $ this -> getColName ( ) ; foreach ( $ arrValues as $ id => $ value ) { if ( null === $ value ) { // The sort key be can remove in later version. $ value = [ 'bin' => [ ] , 'value' => [ ] , 'path' => [ ] , 'sort' => null ] ; } $ files = ToolboxFile :: convertValuesToDatabase ( $ value ) ; // Check single file or multiple file. if ( $ this -> get ( 'file_multiple' ) ) { $ files = \ serialize ( $ files ) ; } else { $ files = $ files [ 0 ] ; } $ this -> connection -> update ( $ this -> quoteReservedWord ( $ tableName ) , [ $ this -> quoteReservedWord ( $ colName ) => $ files ] , [ $ this -> quoteReservedWord ( 'id' ) => $ id ] ) ; } }
docstring: This method is called to store the data for certain items to the database.
  
  @param mixed $arrValues The values to be stored into database. Mapping is item id=>value.
  
  @return void
docstring_tokens: This method is called to store the data for certain items to the database .