Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. $Actions = array (
  2.                       new ChangeAttribute($database, $user->VkId),
  3.                       new Greetings($database, $user->VkId),
  4.                       new DefaultIntent($database, $user->VkId),
  5.                       new ProductInquiry($database, $user->VkId),
  6.                       new Horoscope($database, $user->VkId),
  7.                       new Anecdote($database, $user->VkId)
  8.                     );
  9.  
  10.        
  11.  
  12.     foreach ($Actions as $Action)
  13.     {
  14.       if ($Action -> CheckIntent($response -> getResult() -> getMetadata() -> getIntentName()))
  15.       {
  16.          $Action -> CheckParametr($response -> getResult() -> getParameters());
  17.          $Action -> Execute($response -> getResult() -> getFulfillment() -> getSpeech());        
  18.       }
  19.  
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement