public function getMarked(string $marker): array
    {
        if (!\is_subclass_of($marker, Marker::class)) {
            throw new \InvalidArgumentException(\sprintf('Marker implementation %s must extend %s', $marker, Marker::class));
        }
        
        if (!isset($this->marked[$marker])) {
            $this->cacheMarkers($marker);
        }
        
        return \array_map(function (array $marked) {
            return $this->shared[$marked[0]->typeName] ?? $this->get($marked[0]->typeName);
        }, $this->marked[$marker]);
    }
public function getMarked(string $marker): array
    {
        if (!\is_subclass_of($marker, Marker::class)) {
            throw new \InvalidArgumentException(\sprintf('Marker implementation %s must extend %s', $marker, Marker::class));
        }
        
        if (!isset($this->marked[$marker])) {
            $this->cacheMarkers($marker);
        }
        
        return \array_map(function (array $marked) {
            return $this->shared[$marked[0]->typeName] ?? $this->get($marked[0]->typeName);
        }, $this->marked[$marker]);
    }
public function getMarked ( string $ marker ) : array { if ( ! \ is_subclass_of ( $ marker , Marker :: class ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Marker implementation %s must extend %s' , $ marker , Marker :: class ) ) ; } if ( ! isset ( $ this -> marked [ $ marker ] ) ) { $ this -> cacheMarkers ( $ marker ) ; } return \ array_map ( function ( array $ marked ) { return $ this -> shared [ $ marked [ 0 ] -> typeName ] ?? $ this -> get ( $ marked [ 0 ] -> typeName ) ; } , $ this -> marked [ $ marker ] ) ; }
Get all objects marked with the given marker.

@param string $marker Fully-qualified name of a marker class.
@return array All instantiated marked objects.

@throws \InvalidArgumentException When an invalid marker is passed.
Get all objects marked with the given marker .