Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
公開領域だけ @publicdomain アノテーションをつけてその他は認証するための束縛
<?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