src/ResolvedCollection.php
public function getByClass($className)
    {
        $types = array_unique(Arr::wrap(Arr::get($this->classMapping, $className, [])));
        $resolved = array_map([$this, 'get'], $types);

        return $this->firstOrAll(Arr::collapse($resolved));
    }
public function getByClass($className)
    {
        $types = array_unique(Arr::wrap(Arr::get($this->classMapping, $className, [])));
        $resolved = array_map([$this, 'get'], $types);

        return $this->firstOrAll(Arr::collapse($resolved));
    }
public function getByClass ( $ className ) { $ types = array_unique ( Arr :: wrap ( Arr :: get ( $ this -> classMapping , $ className , [ ] ) ) ) ; $ resolved = array_map ( [ $ this , 'get' ] , $ types ) ; return $ this -> firstOrAll ( Arr :: collapse ( $ resolved ) ) ; }
Get the resolved resource by type.

This will return an array of that resource if multiple resources of that type were
resolved. If only 1 item in the array then that 1 item will be returned instead.

@param string $className
@return mixed|array
Get the resolved resource by type .