Google\Cloud\NaturalLanguage\Annotation::entitiesByType PHP Method

entitiesByType() public method

Example: $entities = $annotation->entitiesByType('PERSON'); foreach ($entities as $entity) { echo $entity['name']; }
See also: https://cloud.google.com/natural-language/reference/rest/v1beta1/Entity#type Entity types documentation
public entitiesByType ( $type ) : array | null
return array | null
    public function entitiesByType($type)
    {
        return $this->filter($this->entities(), ['type'], $type);
    }