Mickhail M | 2d28892 | 2015-03-20 16:01:26 +0300 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | namespace deka6pb\autoparser; |
| 4 | |
| 5 | class Module extends \yii\base\Module |
| 6 | { |
| 7 | public $controllerNamespace = 'deka6pb\autoparser\controllers'; |
| 8 | public $tmpDir = "@runtime/tmp"; |
| 9 | public $postingCount = 1; |
| 10 | public $collectionCount = 1; |
| 11 | public $consumers = []; |
| 12 | public $providers = []; |
| 13 | |
| 14 | public $collectorService; |
| 15 | public $postingService; |
| 16 | |
| 17 | public function init() |
| 18 | { |
| 19 | parent::init(); |
| 20 | |
| 21 | $handler = new components\ApiErrorHandler; |
| 22 | \Yii::$app->set('errorHandler', $handler); |
| 23 | $handler->register(); |
| 24 | } |
| 25 | |
| 26 | public function getMaxCountPosting() { |
| 27 | return $this->postingCount; |
| 28 | } |
| 29 | |
| 30 | public function getMaxCountCollecting() { |
| 31 | return $this->collectionCount; |
| 32 | } |
| 33 | |
| 34 | public function getConsumers() { |
| 35 | return $this->consumers; |
| 36 | } |
| 37 | |
| 38 | public function getProviders() { |
| 39 | return $this->providers; |
| 40 | } |
| 41 | |
| 42 | public function getTmpDir() { |
| 43 | return $this->tmpDir; |
| 44 | } |
| 45 | } |