src/FlexiPeeHP/FlexiBeeRO.php
public function setDataValue($columnName, $value)
    {
        switch ($columnName) {
            case 'kod':
                $value = self::uncode($value); //Alwyas uncode "kod" column
                break;
            default:
                if (is_object($value)) {
                    switch (get_class($value)) {
                        case 'DateTime':
                            $columnInfo = $this->getColumnInfo($columnName);
                            switch ($columnInfo['type']) {
                                case 'date':
                                    $value = self::dateToFlexiDate($value);
                                    break;
                                case 'datetime':
                                    $value = self::dateToFlexiDateTime($value);
                                    break;
                            }
                            break;
                    }
                }
                $result = parent::setDataValue($columnName, $value);
                break;
        }
        return $result;
    }
public function setDataValue($columnName, $value)
    {
        switch ($columnName) {
            case 'kod':
                $value = self::uncode($value); //Alwyas uncode "kod" column
                break;
            default:
                if (is_object($value)) {
                    switch (get_class($value)) {
                        case 'DateTime':
                            $columnInfo = $this->getColumnInfo($columnName);
                            switch ($columnInfo['type']) {
                                case 'date':
                                    $value = self::dateToFlexiDate($value);
                                    break;
                                case 'datetime':
                                    $value = self::dateToFlexiDateTime($value);
                                    break;
                            }
                            break;
                    }
                }
                $result = parent::setDataValue($columnName, $value);
                break;
        }
        return $result;
    }
public function setDataValue ( $ columnName , $ value ) { switch ( $ columnName ) { case 'kod' : $ value = self :: uncode ( $ value ) ; //Alwyas uncode "kod" column break ; default : if ( is_object ( $ value ) ) { switch ( get_class ( $ value ) ) { case 'DateTime' : $ columnInfo = $ this -> getColumnInfo ( $ columnName ) ; switch ( $ columnInfo [ 'type' ] ) { case 'date' : $ value = self :: dateToFlexiDate ( $ value ) ; break ; case 'datetime' : $ value = self :: dateToFlexiDateTime ( $ value ) ; break ; } break ; } } $ result = parent :: setDataValue ( $ columnName , $ value ) ; break ; } return $ result ; }
Set Data Field value

@param string $columnName field name
@param mixed  $value      field data value

@return bool Success
Set Data Field value