Declares atributes more explicitly in rest api classes.
This commit is contained in:
parent
cba8f99caf
commit
0c0a70f229
|
@ -8,7 +8,9 @@ use Tainacan\Repositories;
|
|||
use Tainacan\Entities\Entity;
|
||||
|
||||
class REST_Bulkedit_Controller extends REST_Controller {
|
||||
|
||||
private $metadatum_repository;
|
||||
private $collections_repository;
|
||||
|
||||
protected function get_schema() {
|
||||
return "TODO:get_schema";
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ use Tainacan\Entities\Collection;
|
|||
class REST_Collections_Controller extends REST_Controller {
|
||||
private $collections_repository;
|
||||
private $collection;
|
||||
private $items_repository;
|
||||
|
||||
/**
|
||||
* REST_Collections_Controller constructor.
|
||||
|
|
|
@ -12,6 +12,8 @@ use \Tainacan\Exposers\Mappers\Value;
|
|||
*
|
||||
* */
|
||||
class REST_Exporters_Controller extends REST_Controller {
|
||||
private $collections_repository;
|
||||
|
||||
protected function get_schema() {
|
||||
return "TODO:get_schema";
|
||||
}
|
||||
|
|
|
@ -7,13 +7,15 @@ use Tainacan\Mappers_Handler;
|
|||
use \Tainacan\API\REST_Controller;
|
||||
|
||||
class REST_Exposers_Controller extends REST_Controller {
|
||||
|
||||
private $metadatum_repository;
|
||||
private $exposers;
|
||||
private $mappers;
|
||||
|
||||
protected function get_schema() {
|
||||
return "TODO:get_schema";
|
||||
}
|
||||
|
||||
|
||||
private $metadatum_repository;
|
||||
|
||||
/**
|
||||
* REST_Facets_Controller constructor.
|
||||
*/
|
||||
|
|
|
@ -7,13 +7,12 @@ use Tainacan\Entities;
|
|||
use \Tainacan\API\REST_Controller;
|
||||
|
||||
class REST_Facets_Controller extends REST_Controller {
|
||||
private $metadatum_repository;
|
||||
|
||||
protected function get_schema() {
|
||||
return "TODO:get_schema";
|
||||
}
|
||||
|
||||
|
||||
private $metadatum_repository;
|
||||
|
||||
/**
|
||||
* REST_Facets_Controller constructor.
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,9 @@ class REST_Items_Controller extends REST_Controller {
|
|||
private $item_metadata;
|
||||
private $collections_repository;
|
||||
private $metadatum_repository;
|
||||
private $terms_repository;
|
||||
private $filters_repository;
|
||||
private $taxonomy_repository;
|
||||
|
||||
/**
|
||||
* REST_Items_Controller constructor.
|
||||
|
|
|
@ -7,6 +7,11 @@ use Tainacan\Entities;
|
|||
use Tainacan\Repositories;
|
||||
|
||||
class REST_Metadata_Sections_Controller extends REST_Controller {
|
||||
|
||||
private $metadata_sections_repository;
|
||||
private $metadata_repository;
|
||||
private $collection_repository;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->rest_base = 'metadata-sections';
|
||||
|
|
|
@ -7,6 +7,12 @@ use Tainacan\Entities;
|
|||
use Tainacan\Repositories;
|
||||
|
||||
class REST_Reports_Controller extends REST_Controller {
|
||||
|
||||
private $items_repository;
|
||||
private $taxonomy_repository;
|
||||
private $metadatum_repository;
|
||||
private $collections_repository;
|
||||
|
||||
protected function get_schema() {
|
||||
return "TODO:get_schema";
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ use Tainacan\Repositories;
|
|||
use Tainacan\Entities\Entity;
|
||||
|
||||
class REST_Sequence_Edit_Controller extends REST_Controller {
|
||||
|
||||
private $items_repository;
|
||||
private $collections_repository;
|
||||
|
||||
protected function get_schema() {
|
||||
return "TODO:get_schema";
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ use Tainacan\Repositories;
|
|||
class REST_Taxonomies_Controller extends REST_Controller {
|
||||
private $taxonomy;
|
||||
private $taxonomy_repository;
|
||||
private $collections_repository;
|
||||
|
||||
/**
|
||||
* REST_Taxonomies_Controller constructor.
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Base namespace for all rest api requests. WordPress default is 'wp/v2'.
|
||||
*/
|
||||
const TAINACAN_REST_NAMESPACE = 'tainacan/v2';
|
||||
|
||||
//$rest_controller = new \Tainacan\API\REST_Controller();
|
||||
/**
|
||||
* Tainacan REST APIs initialization.
|
||||
*/
|
||||
$rest_items_controller = new \Tainacan\API\EndPoints\REST_Items_Controller();
|
||||
$rest_terms_controller = new \Tainacan\API\EndPoints\REST_Terms_Controller();
|
||||
$rest_logs_controller = new \Tainacan\API\EndPoints\REST_Logs_Controller();
|
||||
|
|
Loading…
Reference in New Issue