public function offsetSet($offset, $value) { if (($offset == 'value' || $offset == self::DEFAULT_VALUE) && is_array($value)) { $value = json_encode($value); } parent::offsetSet($offset, $value); }
public function offsetSet($offset, $value) { if ($offset == 'name') { $this->title_el['name'] = $value; if (!$this->slug_el['name']) { $this->slug_el['name'] = $value . 'slug'; } } parent::offsetSet($offset, $value); }
public function offsetSet($attribute, $value) { if ($attribute == 'value') { if (preg_match('/\\/api\\/images\\/(\\d+)(\\/(\\d*)x(\\d*)(\\/([a-z\\-]+))?)?/', $value, $matches)) { list($path, $nid, , $width, $height, , $method) = $matches + array(3 => null, 4 => null, 6 => null); $options = array(); $qs = strpos($value, '?'); if ($qs) { parse_str(substr($value, $qs + 1), $options); } $options['width'] = $width; $options['height'] = $height; if ($method) { $options['method'] = $method; } $this->adjust_image['value'] = $nid; $this->adjust_thumbnail_options['value'] = $options; } } parent::offsetSet($attribute, $value); }