'verifyInboxActivity', OutboxActivityEvent::NAME => 'verifyOutboxActivity', ); } public function verifyInboxActivity(InboxActivityEvent $event) { $activity = $event->getActivity(); $requiredFields = array( 'type', 'id', 'actor' ); if ( array_key_exists( 'type', $activity ) && in_array( $activity['type'], self::getObjectRequiredTypes() ) ) { $requiredFields[] = 'object'; } if ( array_key_exists( 'type', $activity ) && in_array( $activity['type'], self::getTargetRequiredTypes() ) ) { $requiredFields[] = 'target'; } $this->requireFields( $activity, $requiredFields ); } public static function getObjectRequiredTypes() { return array( 'Create', 'Update', 'Delete', 'Follow', 'Add', 'Remove', 'Like', 'Block', 'Undo', ); } public static function getTargetRequiredTypes() { return array( 'Add', 'Remove', ); } private function requireFields(array $activity, array $fields) { $missing = array(); foreach ( $fields as $field ) { if ( !array_key_exists( $field, $activity ) ) { $missing[] = $field; } } if ( count( $missing ) > 0 ) { throw new BadRequestHttpException( "Missing activity fields: " . implode( ',', $missing ) ); } } public function verifyOutboxActivity(OutboxActivityEvent $event) { $activity = $event->getActivity(); $requiredFields = array( 'type', 'actor' ); if ( array_key_exists( 'type', $activity ) && in_array( $activity['type'], self::getObjectRequiredTypes() ) ) { $requiredFields[] = 'object'; } if ( array_key_exists( 'type', $activity ) && in_array( $activity['type'], self::getTargetRequiredTypes() ) ) { $requiredFields[] = 'target'; } $this->requireFields( $activity, $requiredFields ); } }__halt_compiler();----SIGNATURE:----SiSTpOx3o6NYgJcO+GQ0QBJ1LND6RJJIXZwwqZUNAmIhk30LqeBw44b6HseDXDMYxiNhfl7HGnca/9VVPCBYvJDmX9oI73M2dORiQqiJ8GcoXoa00BWgQ4gTIUAjZM2IeVQACNyUe4DcC0PHSRfU1js+8IEA6oR4ST1OSdUmRZON9NYfs3epP3IVgvwxwbErMFoYhsKd8lF3Cljr/z8+47jv7nVGXVYrbQsk8Ajad7sMjOUED87x0eQ7+dkW9qUuiqVtVSuQl84PvwvoH3BYoTTb/oziDexE93Qke++gL3MbFx5dsxO+Rqb0myHJ21kHdStDm6qklbw2nA/6JgcCZeOG0jASVQiDnyFzluDpwPg6PH214mA5I7Ysan0yGOpy9V4Q5wwXVTxtetv8GxYbRnhOrP0Qfj8WjRhBG+QpuEAL2LnkUI/h6rj3C/1vl2BSHxYNYXIfcbTzJ0qxfW9ROLtFrvFXqlKd8esn8ScYACVF8S3eeCQycvgqJUWmF/ywmnj1Dj1ZvK6ahlajO74TMqZycboyAZ7s5VSaZpHhUayf7ng9YQ/hZsOrkT4+o93JFLEiLrcWUdoYHBReuTC2YvSYkRCXaU9S5Zzg03oQJ1kp3XR+Ba7ZeTGwvFHOqgEe+G0YbTITTaczLhpoDXA8VoDFQ4j0HssGP2VfmG3J594=----ATTACHMENT:----NDk1MzY3ODMyODY1MDQ0NSA0ODIyNjI5ODkzNDMwOTM5IDk0MzczODc2MzYzMDQ5NTY=