src/TSFlaggedActiveRecord.php
public function setAttributes($values, $safeOnly=true)
    {
        $flags = $this->cachedFlags();
        $notFlags = array();
        foreach ($values as $key => $val) {
            if (array_key_exists($key, $flags)) {
                $this->setFlag($key, $val);
            }
            else {
                $notFlags[$key] = $val;
            }
        }
        parent::setAttributes($notFlags, $safeOnly);
    }
public function setAttributes($values, $safeOnly=true)
    {
        $flags = $this->cachedFlags();
        $notFlags = array();
        foreach ($values as $key => $val) {
            if (array_key_exists($key, $flags)) {
                $this->setFlag($key, $val);
            }
            else {
                $notFlags[$key] = $val;
            }
        }
        parent::setAttributes($notFlags, $safeOnly);
    }
public function setAttributes ( $ values , $ safeOnly = true ) { $ flags = $ this -> cachedFlags ( ) ; $ notFlags = array ( ) ; foreach ( $ values as $ key => $ val ) { if ( array_key_exists ( $ key , $ flags ) ) { $ this -> setFlag ( $ key , $ val ) ; } else { $ notFlags [ $ key ] = $ val ; } } parent :: setAttributes ( $ notFlags , $ safeOnly ) ; }
Sets the attribute and flags values in a massive way.
@param array $values attribute values (name=>value) to be set.
@param boolean $safeOnly whether the assignments should only be done to the safe attributes.
A safe attribute is one that is associated with a validation rule in the current {@link scenario}.
@see getSafeAttributeNames
@see attributeNames
Sets the attribute and flags values in a massive way .