PHP code example of chomenko / app-webloader

1. Go to this page and download the library: Download chomenko/app-webloader 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/ */

    

chomenko / app-webloader example snippets




namespace App;

use Nette\Application\UI\Presenter;
use Chomenko\AppWebLoader\WebLoader;

class BasePresenter extends Presenter
{
	use WebLoader;
}



namespace App;

use Chomenko\AppWebLoader\AppWebLoader;

class SignInFactory{

	public function __construct(AppWebLoader $webLoader)
	{
		$collection = $webLoader->createCollection("signIn");
		$collection->addStyles(__DIR__ . "/../Assets/login.css");
		$collection->addScript(__DIR__ . "/../Assets/login.js");
	}
	
	public function create()
	{
		//...
	}
	
}