src/Places/Autocomplete.php
public function addComponentRestriction($type, $value)
    {
        if (!in_array($type, AutocompleteComponentRestriction::getAvailableAutocompleteComponentRestrictions())) {
            throw PlaceException::invalidAutocompleteComponentRestriction();
        }

        if ($this->hasComponentRestriction($type)) {
            throw PlaceException::autocompleteComponentRestrictionAlreadyExists($type);
        }

        $this->componentRestrictions[$type] = $value;
    }
public function addComponentRestriction($type, $value)
    {
        if (!in_array($type, AutocompleteComponentRestriction::getAvailableAutocompleteComponentRestrictions())) {
            throw PlaceException::invalidAutocompleteComponentRestriction();
        }

        if ($this->hasComponentRestriction($type)) {
            throw PlaceException::autocompleteComponentRestrictionAlreadyExists($type);
        }

        $this->componentRestrictions[$type] = $value;
    }
Adds a component restriction.

@param string $type  The component restriction type.
@param mixed  $value The component restriction value.

@throws \Ivory\GoogleMap\Exception\PlaceException If the component restriction type is not supported.
@throws \Ivory\GoogleMap\Exception\PlaceException If the component restriction type already exists.