public function marked(Marker ...$markers): Binding
    {
        if (empty($this->definition->markers)) {
            $this->definition->markers = [];
        }
        
        foreach ($markers as $marker) {
            $types = $marker->getAllowedTyes();
            
            if (empty($types)) {
                $this->definition->markers[] = $marker;
                
                continue;
            }
            
            foreach ($types as $type) {
                if ($this->definition->typeName == $type || \is_subclass_of($this->definition->typeName, $type)) {
                    $this->definition->markers[] = $marker;
                    
                    continue 2;
                }
            }
            
            throw new \RuntimeException(\vsprintf('Type %s cannot be marked with %s, allowed types are [ %s ]', [
                $this->definition->typeName,
                \get_class($marker),
                \implode(', ', $types)
            ]));
        }
        
        return $this;
    }
public function marked(Marker ...$markers): Binding
    {
        if (empty($this->definition->markers)) {
            $this->definition->markers = [];
        }
        
        foreach ($markers as $marker) {
            $types = $marker->getAllowedTyes();
            
            if (empty($types)) {
                $this->definition->markers[] = $marker;
                
                continue;
            }
            
            foreach ($types as $type) {
                if ($this->definition->typeName == $type || \is_subclass_of($this->definition->typeName, $type)) {
                    $this->definition->markers[] = $marker;
                    
                    continue 2;
                }
            }
            
            throw new \RuntimeException(\vsprintf('Type %s cannot be marked with %s, allowed types are [ %s ]', [
                $this->definition->typeName,
                \get_class($marker),
                \implode(', ', $types)
            ]));
        }
        
        return $this;
    }
public function marked ( Marker ... $ markers ) : Binding { if ( empty ( $ this -> definition -> markers ) ) { $ this -> definition -> markers = [ ] ; } foreach ( $ markers as $ marker ) { $ types = $ marker -> getAllowedTyes ( ) ; if ( empty ( $ types ) ) { $ this -> definition -> markers [ ] = $ marker ; continue ; } foreach ( $ types as $ type ) { if ( $ this -> definition -> typeName == $ type || \ is_subclass_of ( $ this -> definition -> typeName , $ type ) ) { $ this -> definition -> markers [ ] = $ marker ; continue 2 ; } } throw new \ RuntimeException ( \ vsprintf ( 'Type %s cannot be marked with %s, allowed types are [ %s ]' , [ $ this -> definition -> typeName , \ get_class ( $ marker ) , \ implode ( ', ' , $ types ) ] ) ) ; } return $ this ; }
Attaches a marker to the binding.
Attaches a marker to the binding .