1: <?php
2:
3: namespace SMSApi\Api;
4:
5: 6: 7: 8:
9: class SmsFactory extends ActionFactory {
10:
11: 12: 13:
14: public function actionSend() {
15: $action = new \SMSApi\Api\Action\Sms\Send();
16: $action->client( $this->client );
17: $action->proxy( $this->proxy );
18:
19: return $action;
20: }
21:
22: 23: 24: 25: 26:
27: public function actionGet( $id = null ) {
28: $action = new \SMSApi\Api\Action\Sms\Get();
29: $action->client( $this->client );
30: $action->proxy( $this->proxy );
31:
32: if ( !empty( $id ) && is_string( $id ) ) {
33: $action->filterById( $id );
34: } else if ( !empty( $id ) && is_array( $id ) ) {
35: $action->filterByIds( $id );
36: }
37:
38: return $action;
39: }
40:
41: 42: 43: 44: 45:
46: public function actionDelete( $id = null ) {
47: $action = new \SMSApi\Api\Action\Sms\Delete();
48: $action->client( $this->client );
49: $action->proxy( $this->proxy );
50:
51: if ( !empty( $id ) && is_string( $id ) ) {
52: $action->filterById( $id );
53: }
54:
55: return $action;
56: }
57:
58: }
59: