Code Monkey home page Code Monkey logo

slim-plates's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar feryardiant avatar paulrieger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

slim-plates's Issues

Doc upgrade needed: first param $response on render method

Hello!! I'm using your slim-plates integration, it's great, but I cannot run your example because render method's first param doesn't psr7 response.

I try remove render methods' s first param and OK:

// Define named route
$app->get('/hello/{name}', function ($request, $response, $args) {
return $this->view->render('profile', [
'name' => $args['name']
]);
})->setName('profile');

Change your doc please.

Thanks for your integration!

Slim 4

Have plans to migrate to slim 4?

Eventloop applications always use the same response

Need a way to set the response for each request made to the application, in apps like Swoole the response is set only the first time and not for each request. A middleware would be nice for updating the response object inside the library each request.

Need more Extension helper methods

Here the plan.

  • getCharset()

    Retrieve charset value from Response::getHeaderLine('Content-Type').

    Example Usage:

    <head>
    <meta charset="<?=$this->getCharset()?>">
  • getLang()

    Retrieve default application language. Should be provided by $container['settings'] or Negotiation\LanguageNegotiator::getBest() from @willdurand/Negotiation.

    Example Usage:

    <html lang="<?=$this->getLang()?>">

more?

Add method to call Plates render without $response

Can you add the ability to call Plates render without $this->response->write()?

For example creating email templates and using Plates for template inheritance. And attach the rendered html to an email body instead of returning a view for a web response.

Something like this maybe? This would save from instantiating Plates again with the needed settings since we are already.

public function renderWithNoResonse($name, array $data = [])
{
  return $this->plates->render($name, $data);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.