public function hasLocation(Location $location): bool
    {
        return $this->exists(function ($key, $element) use ($location) {
            return $location == $element;
        });
    }
public function hasLocation(Location $location): bool
    {
        return $this->exists(function ($key, $element) use ($location) {
            return $location == $element;
        });
    }
public function hasLocation ( Location $ location ) : bool { return $ this -> exists ( function ( $ key , $ element ) use ( $ location ) { return $ location == $ element ; } ) ; }
Check whether a given location is already registered.

For two locations to be equal, both their path and their extensions must be the same.

@since 0.1.1

@param Location $location Location to check the existence of.

@return bool Whether the location is already registered or not.
Check whether a given location is already registered .