Last active
November 28, 2019 00:55
-
-
Save koriym/0884cae2615d9161a570763950ea9f40 to your computer and use it in GitHub Desktop.
公開領域だけ @publicdomain アノテーションをつけてその他は認証するための束縛
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function configure() | |
{ | |
$this->bindInterceptor( | |
$this->matcher->logicalAnd( | |
$this->matcher->logicalAnd( | |
$this->matcher->logicalNot( | |
$this->matcher->annotatedWith(PublicDomain::class) | |
), | |
$this->matcher->subclassesOf(ResourceObject::class) | |
), | |
$this->matcher->startsWith('MyVendor') | |
), | |
$this->matcher->startsWith('on'), | |
[AuthInterceptor::class] | |
); | |
} | |
// 公開領域だけ@PublicDomainアノテーションをつけてその他は認証するための束縛 | |
// MyVendorクラスのResourceObjectで`PublicDomain`アノテーションがついていないonメソッドに認証用のAuthInterceptorを束縛 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment