Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
yii
base
Model
offsetSet
yii\base\Model::offsetSet PHP Method
Model Class Documentation
Show file
Open project: yiisoft/yii2
offsetSet()
public
method
This method is required by the SPL interface [[\ArrayAccess]]. It is implicitly called when you use something like
$model[$offset] = $item;
.
public
offsetSet
(
integer
$offset
,
mixed
$item
)
$offset
integer
the offset to set element
$item
mixed
the element value
public function offsetSet($offset, $item) { $this->{$offset} = $item; }
Model
activeAttributes
addError
addErrors
afterValidate
attributeHints
attributeLabels
attributes
beforeValidate
clearErrors
createValidators
fields
formName
generateAttributeLabel
getActiveValidators
getAttributeHint
getAttributeLabel
getAttributes
getErrors
getFirstError
getFirstErrors
getIterator
getScenario
getValidators
hasErrors
isAttributeActive
isAttributeRequired
isAttributeSafe
load
loadMultiple
offsetExists
offsetGet
offsetSet
offsetUnset
onUnsafeAttribute
rules
safeAttributes
scenarios
setAttributes
setScenario
validate
validateMultiple