final class ZoneCountService (View source)

Counts the zones a user may see; the backend-specific query lives in the zone repository.

Methods

__construct(ZoneReadRepositoryInterface $zoneRepository, ActorInterface $actor)

No description

int
countZones(string $perm, string $letterstart = 'all', string $zone_type = 'forward')

Count zones with filtering options

Details

__construct(ZoneReadRepositoryInterface $zoneRepository, ActorInterface $actor)

No description

Parameters

ZoneReadRepositoryInterface $zoneRepository
ActorInterface $actor

int countZones(string $perm, string $letterstart = 'all', string $zone_type = 'forward')

Count zones with filtering options

Parameters

string $perm

'all', or 'own' for the acting user's zones

string $letterstart

Starting letters to match (single letter or '1' for numbers) [default='all' for no filtering]

string $zone_type

Type of zones to count ['all', 'forward', 'reverse'] [default='forward']

Return Value

int

Count of zones matched