public function getFlagsOfType($type)
    {
        if ($this->flags === null) {
            return [];
        }

        $matches = [];

        foreach ($this->flags as $flag) {
            if ($flag->type == $type) {
                $matches []= $flag;
            }
        }

        return $matches;
    }
public function getFlagsOfType($type)
    {
        if ($this->flags === null) {
            return [];
        }

        $matches = [];

        foreach ($this->flags as $flag) {
            if ($flag->type == $type) {
                $matches []= $flag;
            }
        }

        return $matches;
    }
public function getFlagsOfType ( $ type ) { if ( $ this -> flags === null ) { return [ ] ; } $ matches = [ ] ; foreach ( $ this -> flags as $ flag ) { if ( $ flag -> type == $ type ) { $ matches [ ] = $ flag ; } } return $ matches ; }
Returns flags of the specified type associated with this address, if any.
@param $type The flag type you're looking for. Will be one of the Flag::TYPE_* constants.
@return array of Flag, or an empty array if none found.
Returns flags of the specified type associated with this address if any .