Filter the attachments by role, contentType, type.

@param string $key
@param string $value

@return self
506628
public function where($key, $value)
    {
        $filter = $this->createFilter($key, $value);
        return new static(array_filter($this->source, $filter));
    }
973837
public function set($key, $value)
    {
        $keys = explode('.', $key);

        $data = $this->getAll();

        $resource = &$data;
        foreach ($keys as $key) {
            if (!isset($resource[$key]) || !is_array($resource[$key])) {
                $resource[$key] = [];
            }
            $resource = &$resource[$key];
        }
        $resource = $value;

        $this->setAll($data);

        return $this;
    }
1017575
public function set($type = null, $key = null, $value = null)
    {
        if (isset($type)) {
            $this->request[$type]["$key"] = $value;
        } else {
            $this->request = array(
                'get' => $_GET,
                'post' => $_POST,
                'files' => $_FILES,
                'cookie' => $_COOKIE
            );
        }

        return $this;
    }
599236
public function with($key, $value = null)
    {
        if (is_array($key)) {
            $this->attributes = array_merge($this->attributes, $key);
        } else {
            $this->attributes[$key] = $value;
        }

        return $this;
    }
1200984
public function filter($key, $value = null)
    {
        $this->invalidateCachedResults();
        return $this->parentFilter($key, $value);
    }
229411
public function setAttribute($key, $value)
    {
        if ($value === null) {
            unset($this->attributes[$key]);
        } else {
            $this->attributes[$key] = $value;
        }

        return $this;
    }
714182
function set($key, $value) {
        if(!$this->enabled) {
            return $this;
        }
        
        parent::set($key, $value);
        if($this !== $this->client->presences) {
            $this->client->presences->set($key, $value);
        }
        
        return $this;
    }
1063396
protected function filter($keys, string $value, bool $exclude = false)
    {
        if (!is_array($keys)) {
            $keys = [$keys];
        }

        $this->content['items'] = collect($this->content['items'])
            ->filter(function ($item) use ($keys, $value, $exclude) {
                return (bool)collect($keys)->filter(function ($key) use ($item, $value, $exclude) {
                    if (array_key_exists($key, $item)) {
                        $itemContainsValue = collect($item[$key])->contains($value);

                        if ($exclude) {
                            return !$itemContainsValue;
                        }

                        return $itemContainsValue;
                    }
                })->count();
            });

        return $this;
    }
739771
public function value($key, $value = null)
    {
        if( null === $value && $key instanceof Expression ) {
            $this->values[] = $key;
        } else {
            $this->values[$key] = $value;
        }
        return $this;
    }
1365736
public function bind($key, $value = null)
    {
        if (is_array($key))
        {
            foreach ($key as $name => $value)
            {
                $this->_bound[$name] = $value;
            }
        }
        else
        {
            $this->_bound[$key] = $value;
        }

        return $this;
    }
546239
public function parseProperty($key, $value)
	{
		if(isset(self::$aliases[$key]))
			$key = self::$aliases[$key];

		$method = 'set'.ucwords($key);

		$this->{$method}($value);

        return $this;
	}
911864
public function data($key, $value=null) :self {
		// if we have an array of data
		if(is_array($key)) {
			// for each of those
			foreach($key as $index => $value) {
				// set them
				$this->data($index, $value);
			}
		}
		else {
			// set a value
			$this->data[$key] = $value;
		}
		// return self
		return $this;
	}
1172549
public function set($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->set($k, $v);
            }
        } else {
            $keyArray    = $this->filter(explode($this->separator, $key), 'number', true);
            $this->array = $this->recurArrayChange($this->array, $keyArray, $value);
        }
        return $this;
    }
923563
public function setPost($key, $value = null)
    {
        if (is_array($key)) {
            $_POST = $key;
        } else {
            $_POST[$key] = $value;
        }
        return $this;
    }
1368217
public function setAttribute($key, $value = null)
    {
        if (is_array($key) && is_null($value)) {
            $this->attributes = $key;
        } else {
            array_set($this->attributes, $key, $value);
        }

        return $this;
    }
177165
public function set($value, $key = null)
    {
        if (is_null($key)) {
            $this->registry[] = $value;
        } else {
            $this->registry[$key] = $value;
        }
        return $this;
    }
389960
public function with( $key, $value = null ) {
		if ( is_array( $key ) ) {
			$this->context = array_merge( $this->getContext(), $key );
		} else {
			$this->context[ $key ] = $value;
		}
		return $this;
	}