feat(components): add custom view renderer with ComponentRenderer adapted from bonfire2

- update Component class structure and remove component helper function and ComponentLoader
- update residual activitypub naming to fediverse
This commit is contained in:
Yassine Doghri 2021-08-27 10:58:22 +00:00
commit a95de8bab0
106 changed files with 1482 additions and 2139 deletions

View file

@ -5,7 +5,7 @@ declare(strict_types=1);
namespace ViewComponents\Config;
use CodeIgniter\Config\BaseService;
use ViewComponents\ComponentLoader;
use ViewComponents\ComponentRenderer;
/**
* Services Configuration file.
@ -19,12 +19,12 @@ use ViewComponents\ComponentLoader;
*/
class Services extends BaseService
{
public static function viewcomponents(bool $getShared = true): ComponentLoader
public static function components(bool $getShared = true): ComponentRenderer
{
if ($getShared) {
return self::getSharedInstance('viewcomponents');
return self::getSharedInstance('components');
}
return new ComponentLoader();
return new ComponentRenderer();
}
}