Overview

Namespaces

  • SMSApi
    • Api
      • Action
        • Mms
        • Phonebook
        • Sender
        • Sms
        • User
        • Vms
      • Response
    • Exception
    • Proxy
      • Http

Classes

  • Delete
  • Get
  • Send
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace SMSApi\Api\Action\Vms;
 4: 
 5: use SMSApi\Api\Action\AbstractAction;
 6: use SMSApi\Proxy\Uri;
 7: 
 8: /**
 9:  * Class Get
10:  * @package SMSApi\Api\Action\Vms
11:  */
12: class Get extends AbstractAction {
13: 
14:     /**
15:      * @var \ArrayObject
16:      */
17:     private $id;
18: 
19:     /**
20:      *
21:      */
22:     function __construct() {
23:         $this->id = new \ArrayObject();
24:     }
25: 
26:     /**
27:      * @param $data
28:      * @return \SMSApi\Api\Response\StatusResponse
29:      */
30:     protected function response( $data ) {
31: 
32:         return new \SMSApi\Api\Response\StatusResponse( $data );
33:     }
34: 
35:     /**
36:      * @return Uri
37:      */
38:     public function uri() {
39: 
40:         $query = "";
41: 
42:         $query .= $this->paramsLoginToQuery();
43: 
44:         $query .= $this->paramsOther();
45: 
46:         $query .= "&status=" . implode( "|", $this->id->getArrayCopy() );
47: 
48:         return new Uri( $this->proxy->getProtocol(), $this->proxy->getHost(), $this->proxy->getPort(), "/api/vms.do", $query );
49:     }
50: 
51:     /**
52:      * Set ID of messages to check.
53:      *
54:      * This id was returned after sending message.
55:      *
56:      * @param $id
57:      * @return $this
58:      * @throws \SMSApi\Exception\ActionException
59:      */
60:     public function filterById( $id ) {
61: 
62:         $this->id->append( $id );
63:         return $this;
64:     }
65: 
66:     /**
67:      * Set IDs of messages to check.
68:      *
69:      * This id was returned after sending message.
70:      *
71:      * @param $ids
72:      * @return $this
73:      * @throws \SMSApi\Exception\ActionException
74:      */
75:     public function filterByIds( array $ids ) {
76: 
77:         $this->id->exchangeArray( $ids );
78:         return $this;
79:     }
80: 
81:     /**
82:      * @deprecated since v1.0.0
83:      */
84:     public function ids($array) {
85:         return $this->filterByIds($array);
86:     }
87: 
88:     /**
89:      * @deprecated since v1.0.0
90:      */
91:     public function id($id) {
92:         return $this->filterById($id);
93:     }
94: 
95: 
96: }
97: 
SMSAPI api client API documentation generated by ApiGen 2.8.0