1: <?php
2:
3: namespace SMSApi\Api;
4:
5: 6: 7: 8:
9: class SenderFactory extends ActionFactory {
10:
11: 12: 13:
14: public function actionList() {
15: $action = new \SMSApi\Api\Action\Sender\SenderList();
16: $action->client( $this->client );
17: $action->proxy( $this->proxy );
18:
19: return $action;
20: }
21:
22: 23: 24: 25:
26: public function actionAdd( $senderName = null ) {
27: $action = new \SMSApi\Api\Action\Sender\Add();
28: $action->client( $this->client );
29: $action->proxy( $this->proxy );
30:
31: if ( !empty( $senderName ) ) {
32: $action->setName( $senderName );
33: }
34:
35: return $action;
36: }
37:
38: 39: 40: 41:
42: public function actionDelete( $senderName = null ) {
43: $action = new \SMSApi\Api\Action\Sender\Delete();
44: $action->client( $this->client );
45: $action->proxy( $this->proxy );
46:
47: if ( !empty( $senderName ) ) {
48: $action->filterBySenderName( $senderName );
49: }
50:
51: return $action;
52: }
53:
54: 55: 56: 57:
58: public function actionSetDefault( $senderName = null ) {
59: $action = new \SMSApi\Api\Action\Sender\SenderDefault();
60: $action->client( $this->client );
61: $action->proxy( $this->proxy );
62:
63: if ( !empty( $senderName ) ) {
64: $action->setSender( $senderName );
65: }
66:
67: return $action;
68: }
69:
70: }
71: