src/Resolve/Resolve.php
public function resolve($value, &$resolutionType)
	{
		if (is_array($value)) {
			$value = $value[0];
		}
		if (is_string($value)) {
			if (strpos($value, '|') !== false) {
				$resolutionType = ResolveAdaptorInterface::TYPE_PIPELINE;
				return $this->resolveMiddlewarePipeline($value);
			} elseif (strpos($value, '::') !== false) {
				$resolutionType = ResolveAdaptorInterface::TYPE_STATIC;
				return $this->resolveStatic($value);
			} elseif (strpos($value, '->') !== false) {
				$resolutionType = ResolveAdaptorInterface::TYPE_INSTANCE;
				return $this->resolveInstanceMethod($value);
			} else {
				$resolutionType = ResolveAdaptorInterface::TYPE_INVOKE;
				return $this->resolveInvokable($value);
			}
		} else {
			$resolutionType = ResolveAdaptorInterface::TYPE_ORIGINAL;
			return $value;
		}
	}
public function resolve($value, &$resolutionType)
	{
		if (is_array($value)) {
			$value = $value[0];
		}
		if (is_string($value)) {
			if (strpos($value, '|') !== false) {
				$resolutionType = ResolveAdaptorInterface::TYPE_PIPELINE;
				return $this->resolveMiddlewarePipeline($value);
			} elseif (strpos($value, '::') !== false) {
				$resolutionType = ResolveAdaptorInterface::TYPE_STATIC;
				return $this->resolveStatic($value);
			} elseif (strpos($value, '->') !== false) {
				$resolutionType = ResolveAdaptorInterface::TYPE_INSTANCE;
				return $this->resolveInstanceMethod($value);
			} else {
				$resolutionType = ResolveAdaptorInterface::TYPE_INVOKE;
				return $this->resolveInvokable($value);
			}
		} else {
			$resolutionType = ResolveAdaptorInterface::TYPE_ORIGINAL;
			return $value;
		}
	}
public function resolve ( $ value , & $ resolutionType ) { if ( is_array ( $ value ) ) { $ value = $ value [ 0 ] ; } if ( is_string ( $ value ) ) { if ( strpos ( $ value , '|' ) !== false ) { $ resolutionType = ResolveAdaptorInterface :: TYPE_PIPELINE ; return $ this -> resolveMiddlewarePipeline ( $ value ) ; } elseif ( strpos ( $ value , '::' ) !== false ) { $ resolutionType = ResolveAdaptorInterface :: TYPE_STATIC ; return $ this -> resolveStatic ( $ value ) ; } elseif ( strpos ( $ value , '->' ) !== false ) { $ resolutionType = ResolveAdaptorInterface :: TYPE_INSTANCE ; return $ this -> resolveInstanceMethod ( $ value ) ; } else { $ resolutionType = ResolveAdaptorInterface :: TYPE_INVOKE ; return $ this -> resolveInvokable ( $ value ) ; } } else { $ resolutionType = ResolveAdaptorInterface :: TYPE_ORIGINAL ; return $ value ; } }
Attempt to convert a provided value into a callable.

If the value is an array, the rest of the rules apply to the first item.
If the value isn't a string it is simply returned.
If the string value contains '|' treat it as a pipeline name.
If the string value contains '::' treat it as a static method call.
If the string value contains '->' treat it as an instance method call.
Otherwise, attempt to treat it as an invokable.

@param string|callable|array $value           The value to resolve.
@param string                $resolutionType Set to the type of resolution identified.

@return callable Usually some form of callable.
Attempt to convert a provided value into a callable .