checkArraySize() публичный статический Метод

public static checkArraySize ( $array, $max_size )
 public function removeWhitelistedDomain(array $domains)
 {
     return $this->api->callApi('me/thread_settings', ['setting_type' => 'domain_whitelisting', 'whitelisted_domains' => MessengerUtils::checkArraySize($domains, 10), 'domain_action_type' => 'remove']);
 }
 public function toArray()
 {
     $this->checkRecipient();
     return ['recipient' => ['id' => $this->recipient_id], 'message' => ['attachment' => ['type' => 'template', 'payload' => ['template_type' => 'generic', 'elements' => MessengerUtils::checkArraySize($this->cards, 10)]]]];
 }
Пример #3
0
 public function toArray()
 {
     //check all buttons for titles!
     return ['title' => MessengerUtils::checkStringLength($this->title, 80), 'item_url' => $this->item_url, 'image_url' => $this->image_url, 'subtitle' => MessengerUtils::checkStringLength($this->subtitle, 80), 'buttons' => MessengerUtils::checkArraySize($this->buttons, 3)];
 }
 public function toArray()
 {
     $this->checkRecipient();
     return ['recipient' => ['id' => $this->recipient_id], 'message' => ['attachment' => ['type' => 'template', 'payload' => ['template_type' => 'button', 'text' => MessengerUtils::checkStringLengthAndEncoding($this->text, 320, 'UTF-8'), 'buttons' => MessengerUtils::checkArraySize($this->buttons, 3)]]]];
 }
 public function toArray()
 {
     $this->checkRecipient();
     return ['recipient' => ['id' => $this->recipient_id], 'message' => ['text' => MessengerUtils::checkStringLengthAndEncoding($this->text, 320, 'UTF-8'), 'quick_replies' => MessengerUtils::checkArraySize($this->replies, 10)]];
 }