| 1 | <?php |
||
| 11 | abstract class AbstractReceiver |
||
| 12 | { |
||
| 13 | /** Api trait */ |
||
| 14 | use Api; |
||
| 15 | |||
| 16 | /** Protected properties */ |
||
| 17 | protected $owner = ''; |
||
| 18 | protected $repo = ''; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Constructor |
||
| 22 | * |
||
| 23 | * @param AbstractApi $api |
||
| 24 | */ |
||
| 25 | public function __construct(AbstractApi $api) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get owner |
||
| 32 | * |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | public function getOwner(): string |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Set owner |
||
| 42 | * |
||
| 43 | * @param string $owner |
||
| 44 | * |
||
| 45 | * @return AbstractReceiver |
||
| 46 | */ |
||
| 47 | public function setOwner(string $owner): AbstractReceiver |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get repository |
||
| 56 | * |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getRepo(): string |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Set repository |
||
| 66 | * |
||
| 67 | * @param string $repo |
||
| 68 | * |
||
| 69 | * @return AbstractReceiver |
||
| 70 | */ |
||
| 71 | public function setRepo(string $repo): AbstractReceiver |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Get a sub-receiver |
||
| 80 | * |
||
| 81 | * @param string $name |
||
| 82 | * |
||
| 83 | * @return null|object |
||
| 84 | */ |
||
| 85 | public function getReceiver(string $name) |
||
| 97 | } |