protected function getBinding(string $interface)
    {
        // If there's a targeted binding, use it
        if ($this->currentTarget !== self::$emptyTarget && isset($this->bindings[$this->currentTarget][$interface])) {
            return $this->bindings[$this->currentTarget][$interface];
        }

        // If there's a universal binding, use it
        if (isset($this->bindings[self::$emptyTarget][$interface])) {
            return $this->bindings[self::$emptyTarget][$interface];
        }

        return null;
    }
protected function getBinding(string $interface)
    {
        // If there's a targeted binding, use it
        if ($this->currentTarget !== self::$emptyTarget && isset($this->bindings[$this->currentTarget][$interface])) {
            return $this->bindings[$this->currentTarget][$interface];
        }

        // If there's a universal binding, use it
        if (isset($this->bindings[self::$emptyTarget][$interface])) {
            return $this->bindings[self::$emptyTarget][$interface];
        }

        return null;
    }
protected function getBinding ( string $ interface ) { // If there's a targeted binding, use it if ( $ this -> currentTarget !== self :: $ emptyTarget && isset ( $ this -> bindings [ $ this -> currentTarget ] [ $ interface ] ) ) { return $ this -> bindings [ $ this -> currentTarget ] [ $ interface ] ; } // If there's a universal binding, use it if ( isset ( $ this -> bindings [ self :: $ emptyTarget ] [ $ interface ] ) ) { return $ this -> bindings [ self :: $ emptyTarget ] [ $ interface ] ; } return null ; }
Gets a binding for an interface

@param string $interface The interface whose binding we want
@return IBinding|null The binding if one exists, otherwise null
Gets a binding for an interface