<?php require_once __DIR__ . '/vendor/autoload.php'; use Silex\Application; class Adidas extends Application { use Application\TwigTrait; use Application\SecurityTrait; use Application\FormTrait; use Application\UrlGeneratorTrait; use Application\SwiftmailerTrait; } $app = new Adidas(); $app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/web/views')); require __DIR__ . '/web/routes.php'; $app->run();
<?php require_once "persone.php"; $persona1 = new Persona("Ale", 20); $persona2 = new Persona("Carol", 18); echo $persona1->correre(10); require_once "prodotto.php"; require_once "scarpe.php"; $scarpe = new Adidas(); $scarpe->getColore();