Ejemplo n.º 1
0
 private function insertIntoOutbox($number, $text, $time)
 {
     $outbox = new Outbox();
     $outbox->DestinationNumber = $number;
     $outbox->TextDecoded = $text;
     $outbox->SendingDateTime = $time;
     $outbox->save();
 }
Ejemplo n.º 2
0
 /**
  * Finds the Outbox model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return Outbox the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Outbox::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Ejemplo n.º 3
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Outbox::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['UpdatedInDB' => $this->UpdatedInDB, 'InsertIntoDB' => $this->InsertIntoDB, 'SendingDateTime' => $this->SendingDateTime, 'SendBefore' => $this->SendBefore, 'SendAfter' => $this->SendAfter, 'Class' => $this->Class, 'ID' => $this->ID, 'RelativeValidity' => $this->RelativeValidity, 'SendingTimeOut' => $this->SendingTimeOut]);
     $query->andFilterWhere(['like', 'Text', $this->Text])->andFilterWhere(['like', 'DestinationNumber', $this->DestinationNumber])->andFilterWhere(['like', 'Coding', $this->Coding])->andFilterWhere(['like', 'UDH', $this->UDH])->andFilterWhere(['like', 'TextDecoded', $this->TextDecoded])->andFilterWhere(['like', 'MultiPart', $this->MultiPart])->andFilterWhere(['like', 'SenderID', $this->SenderID])->andFilterWhere(['like', 'DeliveryReport', $this->DeliveryReport])->andFilterWhere(['like', 'CreatorID', $this->CreatorID]);
     return $dataProvider;
 }