Skip to content

Conversation

alexander-schranz
Copy link

This introduce a namespace loader. This allows to use a namespace like app:: similar to Plates and Blade template engine.

Usage:

    $defaultLoader = new FileLoader(__DIR__ . '/templates');
    $emailLoader = new FileLoader(__DIR__ . '/emails');
    $someLoader = new FileLoader(__DIR__ . '/vendor/some/some/templates');
    $otherLoader = new StringLoader(['main' => 'othercontent']);

    $loader = new NamespaceLoader([
        '' => $defaultLoader,
        'email' => $emailLoader,
        'some' => $someLoader,
        'other' => $otherLoader,
    ]);

This way it is very flexible as we can use any loader again.

@alexander-schranz alexander-schranz force-pushed the feature/namespace-loader branch 2 times, most recently from 91639ac to d8ea450 Compare November 1, 2022 15:57
@alexander-schranz alexander-schranz changed the title Feature/namespace loader Add namespace loader Nov 1, 2022
@alexander-schranz
Copy link
Author

alexander-schranz commented Nov 5, 2022

@dg looks like you rebased it. Do I need to change the target branch?

Edit: Oh my fault looks like the master was force pushed to another state. I will rebase my branch.

@dg dg force-pushed the master branch 11 times, most recently from 0716cd8 to a24efec Compare July 17, 2025 01:06
@dg dg force-pushed the master branch 16 times, most recently from 25ca040 to 271b3a6 Compare August 8, 2025 11:56
@dg dg force-pushed the master branch 3 times, most recently from d6efe40 to 51e3c9b Compare September 2, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants