/**
  * convert an options array into an object
  *
  * @since 1.1
  * @param array $values associative array
  * @return Facebook_Send_Button send button object
  */
 public static function fromArray($values)
 {
     if (!is_array($values) || empty($values)) {
         return;
     }
     $send_button = new Facebook_Send_Button();
     if (isset($values['href']) && is_string($values['href'])) {
         $send_button->setURL($values['href']);
     }
     if (isset($values['font'])) {
         $send_button->setFont($values['font']);
     }
     if (isset($values['colorscheme'])) {
         $send_button->setColorScheme($values['colorscheme']);
     }
     if (isset($values['ref'])) {
         $send_button->setReference($values['ref']);
     }
     return $send_button;
 }
 /**
  * convert an options array into an object
  *
  * @since 1.1
  *
  * @param array $values associative array
  * @return Facebook_Send_Button send button object
  */
 public static function fromArray($values)
 {
     if (!is_array($values) || empty($values)) {
         return;
     }
     $send_button = new Facebook_Send_Button();
     if (isset($values['href']) && is_string($values['href'])) {
         $send_button->setURL($values['href']);
     }
     if (isset($values['font'])) {
         $send_button->setFont($values['font']);
     }
     if (isset($values['colorscheme'])) {
         $send_button->setColorScheme($values['colorscheme']);
     }
     if (isset($values['ref'])) {
         $send_button->setReference($values['ref']);
     }
     if (isset($values['kid_directed_site']) && ($values['kid_directed_site'] === true || $values['kid_directed_site'] === 'true' || $values['kid_directed_site'] == 1)) {
         $send_button->isKidDirectedSite();
     }
     return $send_button;
 }