MetaModels\Attribute\Base::set PHP Method

set() public method

public set ( $strKey, $varValue )
    public function set($strKey, $varValue)
    {
        if (in_array($strKey, $this->getAttributeSettingNames())) {
            if (!is_array($varValue) && substr($varValue, 0, 2) == 'a:') {
                $unSerialized = unserialize($varValue);
            }
            if (isset($unSerialized) && is_array($unSerialized)) {
                $this->arrData[$strKey] = $unSerialized;
            } else {
                $this->arrData[$strKey] = $varValue;
            }
        }
        return $this;
    }