Resolve the provided value to an instancelass method call.

@param string $value The class and method definition string.

@return callable A callable that executes the instance method.
765429
protected function resolveInstanceMethod($value)
	{
		$callable = explode('->', $value);
		$instantiator = $this->instantiator;
		$callable[0] = $instantiator($callable[0]);
		return function (...$params) use ($callable) {
			return call_user_func_array($callable, $params);
		};
	}
1249090
private function resolve($value): Input
    {
        $rules = $this->queueOfRules->toArray();
        $input = Input::make($value);

        foreach ($rules as $rule) {
            $input = $rule->execute($input);
        }

        $input = $this->applyTypeValidation($input);

        return $input;
    }
1039046
public function resolve($value, $default = 'value')
    {
        $matches = [];
        if (is_string($value) && preg_match('/^('.self::KEY_REGEX.')'.  preg_quote($this->separator).'(.*)/', $value, $matches)) {
            if (isset($this->filters[$matches[1]])) {
                return call_user_func_array($this->filters[$matches[1]], [$matches[2]]);
            } else if (function_exists($matches[1])) {
                return call_user_func_array($matches[1], [$matches[2]]);
            }
        }

        return $this->fallback->resolve($value, $default);
    }
1008520
protected function resolveQueueableEntity($value)
	{
		if (is_string($value) && starts_with($value, '::entity::'))
		{
			list($marker, $type, $id) = explode('|', $value, 3);

			return $this->getEntityResolver()->resolve($type, $id);
		}

		return $value;
	}
1144948
public function asValue($value)
    {
        $endPoint = &$this->getEndPoint();
        $endPoint['lookupType'] = self::TYPE_VALUE;
        $endPoint['value'] = $value;

        return $this;
    }
570880
public static function resolveType($value): string
    {
        if (is_array($value)) {
            if (count($value) === 0) {
                return 'array';
            }

            return self::resolveType($value[0]) . '[]';
        }

        return is_object($value) ? get_class($value) : gettype($value);
    }
972504
protected function resolveValue($value)
    {
        if (is_array($value)) {
            $this->value = $value['module'];
        } else {
            $this->value = $value;
        }
        return true;
    }
484806
protected function resolveValue($value)
    {
        do {
            if ($value instanceof \JsonSerializable) {
                $value = $value->jsonSerialize();
            } elseif ($value instanceof \Closure) {
                $value = $value();
            } else {
                break;
            }
        } while (true);

        return $value;
    }
562448
public function transform($value)
    {
        if ($value instanceof JsonSerializable || $value instanceof StdClass) {
            return json_encode($value);
        }

        // If a toJson() method exists, the object can cast itself automatically.
        if (method_exists($value, 'toJson')) {
            return $value;
        }

        // Otherwise, if the object doesn't even have a __toString() method, we can't proceed.
        if (! method_exists($value, '__toString')) {
            throw new \Exception('Cannot transform this object to JavaScript.');
        }

        return "'{$value}'";
    }
891343
public static function tryGetTypeForValue($value)
    {
        if (!is_object($value)) {
            return null;
        }

        // maybe it's a ValueObject

        // try get type name from types map
        $className = get_class($value);
        if (isset(self::$typesMap[$className])) {
            return Type::getType(self::$typesMap[$className]);
        }

        // use class name as type name
        $classNameParts = explode('\\', $className);
        $typeName = array_pop($classNameParts);

        if (array_key_exists($typeName, Type::getTypesMap())) {
            return Type::getType($typeName);
        }

        return null;
    }
1322987
private function _checkAndReturnHasOne($method, $value)
    {
        $cls = get_called_class();
        if (array_key_exists($cls, self::$_has_one)
            && array_key_exists($method, self::$_has_one[$cls])
        ) {
            return $this->_resolveHasOne($method, $value);
        }
    }
826907
public function action(callable $value = null)
    {
        if (null === $value) {
            return $this->action;
        }
        $this->action = $value;
        return $this;
    }
806647
protected function getDefaultBindingResolver($instance, $value)
    {
        $instance = $instance->where($instance->getRouteKeyName(), $value);

        // Only the 'firstOrFail' is included in the binding callable to exclude the
        // exceptions of undefined methods (where, getRouteKeyName) from the errorHandler
        return function () use ($instance) {
            return $instance->firstOrFail();
        };
    }
1168470
public function setMethod($value)
    {
        $allowedMethods = self::allowedMethods();

        if (!in_array($value, $allowedMethods, true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_METHOD, implode(', ', $allowedMethods)));
        }

        return $this->setAttribute('method', $value);
    }
1313322
protected function resolveBinding($key, $value)
    {
        // Explicit binding
        if (isset($this->bindings[$key])) {
            list($binder, $errorHandler) = $this->bindings[$key];

            $callable = $this->getBindingCallable($binder, $value);

            return $this->callBindingCallable($callable, $value, $errorHandler);
        }

        // Implicit binding
        foreach ($this->implicitBindings as $binding) {
            $class = $binding['namespace'] . '\\' . $binding['prefix'] . ucfirst($key) . $binding['suffix'];

            if (class_exists($class)) {
                $instance = $this->resolveClass($class);

                // If special method name is defined, use it, otherwise, use the default
                if ($method = $binding['method']) {
                    $callable = [$instance, $method];
                } else {
                    $callable = $this->getDefaultBindingResolver($instance, $value);
                }

                return $this->callBindingCallable(
                    $callable,
                    $value,
                    $binding['errorHandler']
                );
            }
        }

        // Return the value unchanged if no binding found
        return $value;
    }
499048
public function getTypeOf($value)
    {
        foreach ($this->getPossibleTypes() as $type) {
            if ($isTypeOf = $type->isTypeOf($value)) {
                return $type;
            }

            if (!isset($isTypeOf)) {
                throw new \Exception(sprintf(
                    'Non-Object Type %s does not implement resolveType and Object ' .
                    'Type %s does not implement isTypeOf. There is no way to ' .
                    'determine if a value is of this type.', $this->getName(), $type->getName()
                ));
            }
        }

        return NULL;
    }
545263
static function ByValue($value)
    {
        $calledClass = get_called_class();
        $allowed = self::AllowedClassValues($calledClass);
        if (!in_array($value, $allowed, true))
            throw new \InvalidArgumentException('Value ' . $value . ' not allowed for enum ' . $calledClass);
        
        return new $calledClass($value);
    }