| @@ -35,8 +35,24 @@ | ||
| 35 | 35 | */ |
| 36 | 36 | private $translatable_objects; |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | + * The namespace of this controller's route. Override the parent class property with a default value. | |
| 40 | + * | |
| 41 | + * @var string | |
| 42 | + * @phpstan-var 'pll/v1' | |
| 43 | + */ | |
| 44 | + protected $namespace = 'pll/v1'; | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * The base of this controller's route. Override the parent class property with a default value. | |
| 48 | + * | |
| 49 | + * @var string | |
| 50 | + * @phpstan-var 'languages' | |
| 51 | + */ | |
| 52 | + protected $rest_base = 'languages'; | |
| 53 | + | |
| 54 | + /** | |
| 39 | 55 | * Constructor. |
| 40 | 56 | * |
| 41 | 57 | * @since 3.7 |
| 42 | 58 | * |
| @@ -42,10 +58,8 @@ | ||
| 42 | 58 | * |
| 43 | 59 | * @param PLL_Model $model Polylang's model. |
| 44 | 60 | */ |
| 45 | 61 | public function __construct( PLL_Model $model ) { |
| 46 | - $this->namespace = 'pll/v1'; | |
| 47 | - $this->rest_base = 'languages'; | |
| 48 | 62 | $this->languages = $model->languages; |
| 49 | 63 | $this->translatable_objects = $model->translatable_objects; |
| 50 | 64 | } |
| 51 | 65 | |