PluginProbe
Polylang / trunk
Polylang vtrunk
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | src/modules/REST/V1/Languages.php +16 -2 3.8.9 → trunk View file →
@@ -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