src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php
protected function convertValuesForStorage($values) {
    // filter values according to type
    foreach($values as $valueName => $value) {
      $type = $this->getAttribute($valueName)->getType();
      // integer
      if (strpos(strtolower($type), 'int') === 0) {
        $value = (strlen($value) == 0) ? null : intval($value);
        $values[$valueName] = $value;
      }
      // null values
      if ($value === null) {
        $values[$valueName] = SQLConst::NULL();
      }
    }
    return $values;
  }
protected function convertValuesForStorage($values) {
    // filter values according to type
    foreach($values as $valueName => $value) {
      $type = $this->getAttribute($valueName)->getType();
      // integer
      if (strpos(strtolower($type), 'int') === 0) {
        $value = (strlen($value) == 0) ? null : intval($value);
        $values[$valueName] = $value;
      }
      // null values
      if ($value === null) {
        $values[$valueName] = SQLConst::NULL();
      }
    }
    return $values;
  }
protected function convertValuesForStorage ( $ values ) { // filter values according to type foreach ( $ values as $ valueName => $ value ) { $ type = $ this -> getAttribute ( $ valueName ) -> getType ( ) ; // integer if ( strpos ( strtolower ( $ type ) , 'int' ) === 0 ) { $ value = ( strlen ( $ value ) == 0 ) ? null : intval ( $ value ) ; $ values [ $ valueName ] = $ value ; } // null values if ( $ value === null ) { $ values [ $ valueName ] = SQLConst :: NULL ( ) ; } } return $ values ; }
Convert values before putting into storage
@param $values Associative Array
@return Associative Array
Convert values before putting into storage