PHP code example of elvenspellmaker / glaza

1. Go to this page and download the library: Download elvenspellmaker/glaza library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elvenspellmaker / glaza example snippets

`



use ElvenSpellmaker\Глаза\View;

$view = new View( 'ViewTestHtml' );
`
$view->set( 'foo', 'World!' );
`
$view->set('bar', new View( 'NestedView' ) );

<html>
    <body>
        Hello <?=$foo

<html>
    <body>
        Hello World!
    </body>
</html>
`
$view->set('foo', '<b>Not Bold</b>');
`
$view->set('foo', '<b>Bold</b>', false);

use ElvenSpellmaker\Глаза\ViewManager;

ViewManager::addViewPath( __DIR__ ); // Adds the current script's path to the ViewManager.