->setFrom()

->setFrom() -- Copy items from Array or Object (for form posting)

Synopsis

Описание

Copies items that are in the table definitions from an array or object into the current object (It will not override key values). This can be used to process form posts (if the field names match the database), or cloning similar objects.

you can not set the value of a key column using setFrom, It is silently ignored for security reasons. (you can still assign it manually)

setFrom will attempt to call the setters set{columnname} methods if they exist, It will also call fromValue(), which formats dates correctly.

You may realize that this method overlaps the overloaded method for the column name from, due to this, the associated methods for the column name 'from' are set_from and getFrom.

Параметр

Возвращаемое значение

array or boolean - TRUE on success or an array of set*() return values in PHP4.3.2 upwards

Заметка

Эта функция не должна вызываться статически.

Пример

    Поддержать сайт на родительском проекте КГБ