PHP 클래스 DrewM\MailChimp\Webhook

How to Set Up Webhooks: http://eepurl.com/bs-j_T
저자: Drew McLellan ([email protected])
파일 보기 프로젝트 열기: drewm/mailchimp-api 1 사용 예제들

공개 메소드들

메소드 설명
receive ( string $input = null ) : array | false Retrieve the incoming webhook request as sent.
subscribe ( string $event, callable $callback ) : void Subscribe to an incoming webhook request. The callback will be invoked when a matching webhook is received.

비공개 메소드들

메소드 설명
dispatchWebhookEvent ( string $event, array $data ) : void Call any subscribed callbacks for this event
processWebhook ( string $input ) : array | false Process the raw request into a PHP array and dispatch any matching subscription callbacks

메소드 상세

receive() 공개 정적인 메소드

Retrieve the incoming webhook request as sent.
public static receive ( string $input = null ) : array | false
$input string An optional raw POST body to use instead of php://input - mainly for unit testing.
리턴 array | false An associative array containing the details of the received webhook

subscribe() 공개 정적인 메소드

Subscribe to an incoming webhook request. The callback will be invoked when a matching webhook is received.
public static subscribe ( string $event, callable $callback ) : void
$event string Name of the webhook event, e.g. subscribe, unsubscribe, campaign
$callback callable A callable function to invoke with the data from the received webhook
리턴 void