Get alias value from mutator or directly from attribute

@param  string $key
@param  mixed $value
@return mixed
484687
public function mutateAttribute($key, $value)
    {
        if ($this->hasGetMutator($key)) {
            return parent::mutateAttribute($key, $value);
        }

        return $this->getAttribute($key);
    }
922279
public function withDirectoryPosition($key, $value)
    {
        $clone = clone $this;

        if ($key === count($clone->info['path'])) {
            $clone->info['file'] = $value;

            return $clone;
        }

        $clone->info['path'][$key] = $value;

        return $clone;
    }
987693
public function set($key, $value) {
    if ($value === 'false') {
      $value = FALSE;
    }
    elseif ($value === 'true') {
      $value = TRUE;
    }

    // Expand properties in string. We do this here so that one can pass
    // -D drush.alias=${drush.ci.aliases} at runtime and still expand
    // properties.
    if (is_string($value) && strstr($value, '$')) {
      $expanded = Expander::expandArrayProperties([$value], $this->export());
      $value = $expanded[0];
    }

    return parent::set($key, $value);

  }
463654
public function set($key, $value)
    {
        $this->load();

        if ( ! $this->has($key)) {
            $this->dirt[$key] = [
                'type' => 'created',
                'value' => $value,
            ];
        }

        if ($this->has($key) && $this->get($key) != $value) {
            $this->dirt[$key] = [
                'type' => 'updated',
                'value' => $value
            ];
        }

        Arr::set($this->settings, $key, $value);

        return $value;
    }
337979
public static function alias($path, $value = null)
    {
        // get path by alias
        if (\is_string($path) && !$value) {
            // don't use alias
            if ($path[0] !== '@') {
                return $path;
            }

            $sep = '/';
            $path = str_replace(['/', '\\'], $sep, $path);

            // only a alias. e.g. @project
            if (!strpos($path, $sep)) {
                return self::$aliases[$path] ?? $path;
            }

            // have other partial. e.g: @project/temp/logs
            $realPath = $path;
            list($alias, $other) = explode($sep, $path, 2);

            if (isset(self::$aliases[$alias])) {
                $realPath = self::$aliases[$alias] . $sep . $other;
            }

            return $realPath;
        }

        if ($path && $value && \is_string($path) && \is_string($value)) {
            $path = [$path => $value];
        }

        // custom set path's alias. e.g: Slim::alias([ 'alias' => 'path' ]);
        if (\is_array($path)) {
            /**
             * @var string $alias
             * @var string $realPath
             */
            foreach ($path as $alias => $realPath) {
                // 1th char must is '@'
                if ($alias[0] !== '@') {
                    continue;
                }

                self::$aliases[$alias] = self::alias($realPath);
            }
        }

        return true;
    }
1151069
public function setAttribute($key, $value)
	{
		// First we will check for the presence of a mutator for the set operation
		// which simply lets the developers tweak the attribute as it is set on
		// the model, such as "json_encoding" an listing of data for storage.
		if ($this->hasSetMutator($key)) {
			$method = 'set' . Str::studly($key) . 'Attribute';

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

		// If an attribute is listed as a "date", we'll convert it from a DateTime
		// instance into a form proper for storage on the database tables using
		// the connection grammar's date format. We will auto set the values.
		elseif (in_array($key, $this->getDates()) && $value) {
			$value = $this->fromDateTime($value);
		}

		// Only set if the user can currently access
		if ($this->console_mode || $this->modify_authorizer->canAccess($key)) {
			if ($this->isJsonCastable($key) && ! is_null($value)) {
				$value = json_encode($value);
			}

			$this->attributes[$key] = $value;
		}
	}
825065
public function setAttribute($key, $value)
    {
        // First we will check for the presence of a mutator for the set operation
        // which simply lets the developers tweak the attribute as it is set on
        // the model, such as "json_encoding" an listing of data for storage.
        if ($this->hasSetMutator($key)) {
            $method = 'set' . Helper::studly($key) . 'Attribute';

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

            return;
        }
        if ($this->isJsonCastable($key)) {
            $value = json_encode($value);
        }
        $this->attributes[$key] = $value;
    }
788959
public function put(string $key, $value)
    {
        $this->cache[$this->hashKey($key)] = $value;
        return $value;
    }
151605
public function rPush($key, $value) {
        return $this->getHandler($this->judge(__FUNCTION__))->rPush($key, $value);
    }
1178751
public function set($key, $value) {
        setvalr(trim($key), $this->data, $value);
        return $value;
    }
799293
public function setAttribute($key, $value)
    {
        // First we will check for the presence of a mutator for the set operation
        // which simply lets the developers tweak the attribute as it is set on
        // the model, such as "json_encoding" an listing of data for storage.
        if ($this->hasSetMutator($key)) {
            return $this->setMutatedAttributeValue($key, $value);
        }

        // If an attribute is listed as a "date", we'll convert it from a DateTime
        // instance into a form proper for storage on the database tables using
        // the connection grammar's date format. We will auto set the values.
        elseif ($value && $this->isDateAttribute($key)) {
            $value = $this->fromDateTime($value);
        }

        if ($this->isJsonCastable($key) && ! is_null($value)) {
            $value = $this->castAttributeAsJson($key, $value);
        }

        // If this attribute contains a JSON ->, we'll set the proper value in the
        // attribute's underlying array. This takes care of properly nesting an
        // attribute in the array's value in the case of deeply nested items.
        if (Str::contains($key, '->')) {
            return $this->fillJsonAttribute($key, $value);
        }

        $this->attributes[$key] = $value;

        return $this;
    }
144778
public function setAttribute( $key, $value )
	{
		// First we will check for the presence of a mutator for the set operation
		// which simply lets the developers tweak the attribute as it is set on
		// the model, such as "json_encoding" an listing of data for storage.
		if ( $this->hasSetMutator( $key ) )
		{
			$method = 'set' . Str::studly( $key ) . 'Attribute';

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

		// If an attribute is listed as a "date", we'll convert it from a DateTime
		// instance into a form proper for storage on the database tables using
		// the connection grammar's date format. We will auto set the values.
		elseif ( $value && ( in_array( $key, $this->getDates() ) || $this->isDateCastable( $key ) ) )
		{
			$value = $this->fromDateTime( $value );
		}

		if ( $this->isJsonCastable( $key ) && !is_null( $value ) )
		{
			$value = $this->asJson( $value );
		}

		$this->attributes[$key] = $value;

		return $this;
	}
518530
public function set($key, $value = null) {

        // Do not trigger state changes for relations
        if (!$this->hasRelation($key)) {

            // Only flag changed if the value is different
            if ($value != $this->get($key) && !in_array($key, $this->reserved)) {
                $this->_changed = true;
            }

            // Run the value through a mutator but do not set the mutator key
            if ($method = $this->hasMutator($key)) {
                $this->{$method}($value);

                return $this;
            }
        }

        $this->_attributes[$key] = $value;

        return $this;
    }
380772
public function findByKeyAndValue(string $key, $value): MapInterface
    {
        return $this->find(function (MapInterface $item) use ($key, $value): bool {
            return $item->get($key) === $value;
        });
    }
1333490
private function filter($key, $value)
    {
        if (isset($this->filters[ $key ])) {
            foreach ($this->filters[ $key ] as $filter) {
                $value = $filter($value);
            }
        }

        return $value;
    }
1185258
public function alias($alias, $value = '')
    {
        // set
        if ($alias && $value) {
            $this->aliasAndValueCheck($alias, $value);
            $this->aliases[$alias] = trim($value);

            // get
        } else {
            return $this->resolveAlias($alias);
        }

        return $this;
    }
1105218
public function SelectKeyValue( $Key , $Value ) {

        $Key = new Expression( $Key );
        $Value = new Expression( $Value );

        $items = array();

        foreach ( $this->repository as $item ) {
            $_k = $Key->execute( $item );
            $_v = $Value->execute( $item );
            $items[$_k] = $_v;
        }

        return new Queryable( $items );

    }