| | |
| | | <?php |
| | | namespace JVBase; |
| | | |
| | | use JVBase\blocks\CustomBlocks; |
| | | use JVBase\integrations\BlueSky; |
| | | use JVBase\managers\CacheManager; |
| | | use JVBase\managers\EmailManager; |
| | | use JVBase\managers\ErrorHandler; |
| | | use JVBase\managers\LoginManager; |
| | | use JVBase\managers\MagicLinkManager; |
| | | use JVBase\managers\OperationQueue; |
| | | use JVBase\managers\DashboardManager; |
| | | use JVBase\managers\DirectoryManager; |
| | | use JVBase\managers\ReferralManager; |
| | | use JVBase\managers\RoleManager; |
| | | //use JVBase\managers\SchemaManager; |
| | |
| | | protected array $integrations = []; |
| | | protected array $blocks = []; |
| | | protected array $routes = []; |
| | | protected CustomBlocks $customBlocks; |
| | | |
| | | protected array $serviceMap = [ |
| | | 'maps' => 'JVBase\integrations\GoogleMaps', |
| | |
| | | |
| | | public function __construct() |
| | | { |
| | | $this->customBlocks = new CustomBlocks(); |
| | | $this->managers = [ |
| | | 'errors' => new ErrorHandler(), |
| | | 'queue' => new OperationQueue(), |
| | |
| | | $this->routes['term'] = new TermRoutes(); |
| | | } |
| | | |
| | | if (Features::forSite()->has('is_directory')) { |
| | | $this->managers['directory'] = new DirectoryManager(); |
| | | } |
| | | |
| | | |
| | | if (jvbSiteHasDashboard()) { |
| | | $this->routes['error'] = new ErrorRoutes(); |
| | |
| | | { |
| | | return array_merge(array_keys($this->content), array_keys($this->taxonomies)); |
| | | } |
| | | public function dashboard() |
| | | public function dashboard():DashboardManager|false |
| | | { |
| | | return $this->managers['dash']; |
| | | return $this->managers['dash']??false; |
| | | } |
| | | public function error() |
| | | public function directories():DirectoryManager|false |
| | | { |
| | | return $this->managers['directory']??false; |
| | | } |
| | | public function error():ErrorHandler |
| | | { |
| | | return $this->managers['errors']; |
| | | } |
| | |
| | | { |
| | | return $this->managers['file']; |
| | | } |
| | | public function cache() |
| | | public function cache():CacheManager |
| | | { |
| | | return $this->managers['cache']; |
| | | } |
| | | public function queue() |
| | | public function queue():OperationQueue |
| | | { |
| | | return $this->managers['queue']; |
| | | } |
| | |
| | | // { |
| | | // return $this->managers['forms']; |
| | | // } |
| | | public function notification() |
| | | public function notification():NotificationManager|false |
| | | { |
| | | return $this->managers['notifications']; |
| | | return $this->managers['notifications']??false; |
| | | } |
| | | public function routes($route):mixed |
| | | { |
| | |
| | | } |
| | | return false; |
| | | } |
| | | public function roles() |
| | | public function roles():RoleManager |
| | | { |
| | | return $this->managers['roles']; |
| | | } |
| | |
| | | <?php |
| | | } |
| | | } |
| | | |
| | | public function blocks():CustomBlocks|bool |
| | | { |
| | | return $this->customBlocks??false; |
| | | } |
| | | } |