Transform contact.
@param $value
@param $index
353742
public function transformContact ($value, $index)
	{
		if (! ($this[$index] instanceof Contact)) {
			$contact = Contact::fromMixed ($value);
			$this[$index] = $contact;
		}
	}
1098379
public function offsetSet($index, $value)
    {
        if (is_array($value)) {
            $this->{$index} = new self($value);
        } else {
            $this->{$index} = $value;
        }
    }
812756
public function transform($value)
    {
        if (null === $value) {
            return null;
        }

        if (!$value instanceof APILocation) {
            throw new TransformationFailedException('Expected a ' . APILocation::class . ' object.');
        }

        return $value->id;
    }
457542
public static function transform($value, callable $callback, $default = null)
    {
        if (self::filled($value)) {
            return $callback($value);
        }

        if (\is_callable($default)) {
            return $default($value);
        }

        return $default;
    }
769349
public function offsetSet($index, $value) {
		if( is_null($index) ){
			$this->results[] = $value;
			return;
		}
		$this->results[$index] = $value;
	}
21599
protected function _modifyBreadcrumbData($index, $field, $value)
    {
        //brak wartości
        if (!$value) {
            return;
        }
        //ustawienie wartości
        $this->_breadcrumbsData[$index][$field] = $value;
    }
1095969
public static function set(string $index, $value)
    {
        Base::checkOpen();
        Base::getSessionObject()->set($index, $value);
    }
1142591
public function setPhone(?string $value) : Contact
    {

        if ($this->data['phone'] !== $value) {
            $this->data['phone'] = $value;
            $this->setModified('phone');
        }

        return $this;
    }
530154
private function transform(DefinitionCall $definitionCall, Transformation $transformation, $index, $value)
    {
        if (is_object($value) && !$value instanceof ArgumentInterface) {
            return $value;
        }

        if ($transformation instanceof SimpleArgumentTransformation &&
            $transformation->supportsDefinitionAndArgument($definitionCall, $index, $value)) {
            return $transformation->transformArgument($this->callCenter, $definitionCall, $index, $value);
        }

        if ($transformation instanceof PatternTransformation &&
            $transformation->supportsDefinitionAndArgument($this, $definitionCall, $value)) {
            return $transformation->transformArgument($this, $this->callCenter, $definitionCall, $value);
        }

        return $value;
    }
1015067
public function add($value)
    {
        if (!$value instanceof Contact) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s only accepts instances of %s.',
                    __FUNCTION__, Contact::class
                )
            );
        }

        return parent::add($value);
    }
782213
public function addMethodMetadata($method, $index, $value)
    {
        if (!isset($this->methodMetadata[$method])) {
            $this->methodMetadata[$method] = array($index => $value);
        } else {
            $this->methodMetadata[$method][$index] = $value;
        }

        return $this;
    }
909205
public function offsetSet($index = null, $newvalue) : void
    {
        if (!isset($index)) {
            $index = count((array)$this);
        }
        if (is_object($newvalue)
            && method_exists($newvalue, 'setIdPrefix')
            && isset($this->attributes['id'])
        ) {
            $newvalue->setIdPrefix($this->attributes['id']);
        }
        parent::offsetSet($index, $newvalue);
    }
681257
public function insert($index, $value)
    {
        $count = $this->count();

        if ($index == $count) {
            return $this->append($value);
        }

        if ($index < 0) {
            throw new OutOfRangeException("Index have to be greater than 0 not $index");
        }

        if ($index > $count) {
            throw new OutOfRangeException("Index $index overflows greatest index $count");
        }

        array_splice($this->source, $index, 0, $value);

        return $this;
    }
1296848
public void replace(int index, Object value) {
    values.set(index, value);
    this.path = null; // path is no longer valid if values are replaced
  }
711363
public function setEmail(?string $value) : Contact
    {

        if ($this->data['email'] !== $value) {
            $this->data['email'] = $value;
            $this->setModified('email');
        }

        return $this;
    }
154802
public function offsetSet($offset, $value)
	 {
		 if (is_null ($offset))
		 {
			 $index = array_push ($this->data, $value) - 1;
			 $this->trigger ('add', $value, $index);
		 }
		 else
		 {
			$this->data[$offset] = $value;

			 if (isset ($this->data[$offset]))
			 {
				 $this->trigger ('add', $value, $offset);
			 }
			 else {
				 $this->trigger ('set', $value, $offset);
			 }
		 }
	 }
825885
public function setValue($value, $index = null)
    {
        if ($index === null) {
            $this->value = Arr::cast($value);
        }
        else {
            $this->value[$index] = $value;
        }
        return $this;
    }