getGuards() 공개 메소드

Get the guards options
public getGuards ( ) : array
리턴 array
예제 #1
0
 public function testSettersAndGetters()
 {
     $moduleOptions = new ModuleOptions(['identity_provider' => 'IdentityProvider', 'guest_role' => 'unknown', 'guards' => [], 'protection_policy' => 'deny', 'role_provider' => [], 'assertion_map' => ['foo' => 'bar'], 'unauthorized_strategy' => ['template' => 'error/unauthorized'], 'redirect_strategy' => ['redirect_to_route_connected' => 'home', 'redirect_to_route_disconnected' => 'login']]);
     $this->assertEquals('IdentityProvider', $moduleOptions->getIdentityProvider());
     $this->assertEquals('unknown', $moduleOptions->getGuestRole());
     $this->assertEquals([], $moduleOptions->getGuards());
     $this->assertEquals('deny', $moduleOptions->getProtectionPolicy());
     $this->assertEquals([], $moduleOptions->getRoleProvider());
     $this->assertEquals(['foo' => 'bar'], $moduleOptions->getAssertionMap());
     $this->assertInstanceOf('ZfcRbac\\Options\\UnauthorizedStrategyOptions', $moduleOptions->getUnauthorizedStrategy());
     $this->assertInstanceOf('ZfcRbac\\Options\\RedirectStrategyOptions', $moduleOptions->getRedirectStrategy());
 }