ConstMapAccess
Note
This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information.
The interface for enabling access to the Maps values
This interface provides no new methods as all current access for Maps are
defined in its parent interfaces. But you could theoretically use this
interface for parameter and return type annotations.
Guides
Interface Synopsis
interface ConstMapAccess implements ConstSetAccess<Tk>, ConstIndexAccess<Tk, Tv> {...}
Public Methods (ConstSetAccess)
->contains(arraykey $m): bool
Checks whether a value is in the currentSet
Public Methods (ConstIndexAccess)
->at(Tk $k): Tv
Returns the value at the specified key in the current collection->containsKey(mixed $k): bool
Determines if the specified key is in the current collection->get(Tk $k): ?Tv
Returns the value at the specified key in the current collection