of 14/14
Štěpán Kocourek pro PéHáPkaře Praha, 22. 12. 2016 Novinky v Nette 2.4

Vánoční rychlovky: Novinky v Nette 2.4

  • View
    168

  • Download
    0

Embed Size (px)

Text of Vánoční rychlovky: Novinky v Nette 2.4

  • tpn Kocourek pro PHPkae

    Praha, 22. 12. 2016

    Novinky v Nette 2.4

  • Nette 2.4 vyaduje PHP 5.6

  • vchoz protokol generovn odkaz

    shodn s protokolem poadavku

    new Route('https://%host%/kosik', '...');

    Route::SECURED deprecated

  • %basePath% /admin/

    %tld% com

    %domain% example.com

    %sld% example

    %host% test.example.com

    Route: test.example.com/admin

  • AJAXov Tracy

  • function beforeRender() {

    $this->template->lang = $this->lang;

    }

    {foreach $langs as $lang}

    {$lang}

    {/foreach}

    Latte: upozorn pi pepsn promnn

  • {include 'file.latte'}

    {includeblock 'file.latte'}

    {import 'file.latte'}

    Latte: makro {import}

  • {$var|noescape|nl2br|escape}

    {$var|breaklines}

    Latte: nl2br breaklines

  • {!$var}

    {$var|noescape}

    Latte: {!$var} deprecated

  • $template->addFilter('texy', function ($s) use ($texy)

    {

    return $texy->process($s);

    });

    {$var|texy|noescape}

    Latte: patn pklad filtru pro Texy!

  • $template->addFilter('texy', function ($s) use ($texy)

    {

    return new Latte\Runtime\Html($texy->process($s));

    });

    {$var|texy}

    Latte: pklad filtru pro Texy!

  • Trait Nette\SmartObject

    Trait Nette\StaticClass

    Nslednk Nette\Object

  • talks.kocourek.io/pehapkari

    [email protected]

    Dkuji za pozornost!

  • Releases st Nette na GitHubu

    https://github.com/nette/application/releases/

    application nahrate nzvy dalch st Nette

    Nslednk Nette\Object David Grudl (YouTube)

    https://www.youtube.com/watch?v=WOEmbEL9N6c

    Fix compatibility with Nette 2.4 Martin Zlmal (zlml.cz)

    http://zlml.cz/fix-compatibility-with-nette-2-4

    Zdroje

    https://github.com/nette/application/releases/https://www.youtube.com/watch?v=WOEmbEL9N6chttp://zlml.cz/fix-compatibility-with-nette-2-4