public function checkNotification($notify) {
    if (!is_array($notify)) {
      return FALSE;
    }

    $notifyParams = array();
    foreach ($this->notifyFields as $k => $mandatory) {
      if (isset($notify[$k])) {
        $notifyParams[$k] = $notify[$k];
      }
      elseif (!isset($notify[$k]) && $mandatory) {
        throw new \Exception('expected notification field ' . $k . ' is missing');
      }
    }

    return $notifyParams;
  }
public function checkNotification($notify) {
    if (!is_array($notify)) {
      return FALSE;
    }

    $notifyParams = array();
    foreach ($this->notifyFields as $k => $mandatory) {
      if (isset($notify[$k])) {
        $notifyParams[$k] = $notify[$k];
      }
      elseif (!isset($notify[$k]) && $mandatory) {
        throw new \Exception('expected notification field ' . $k . ' is missing');
      }
    }

    return $notifyParams;
  }
public function checkNotification ( $ notify ) { if ( ! is_array ( $ notify ) ) { return FALSE ; } $ notifyParams = array ( ) ; foreach ( $ this -> notifyFields as $ k => $ mandatory ) { if ( isset ( $ notify [ $ k ] ) ) { $ notifyParams [ $ k ] = $ notify [ $ k ] ; } elseif ( ! isset ( $ notify [ $ k ] ) && $ mandatory ) { throw new \ Exception ( 'expected notification field ' . $ k . ' is missing' ) ; } } return $ notifyParams ; }
Returns all notify param fields in the correct order.

@param mixed $notify
@return mixed|boolean $notifyParams
@throws \Exception if one of the mandatory fields is not set
Returns all notify param fields in the correct order .