LeagueWrap\Region::isLocked PHP Метод

isLocked() публичный Метод

Determines wether the given region is locked out.
public isLocked ( array $regions ) : boolean
$regions array
Результат boolean
    public function isLocked(array $regions)
    {
        if (count($regions) == 0) {
            // no regions are locked from this call.
            return true;
        }
        foreach ($regions as $region) {
            if ($this->region == strtolower($region)) {
                // the region is fine
                return false;
            }
        }
        // the region was not found
        return true;
    }

Usage Example

Пример #1
0
 public function testIsLockedFalse()
 {
     $region = new Region('euw');
     $this->assertFalse($region->isLocked(['na', 'euw', 'eune']));
 }