PHP code example of adrianmejias / veil
1. Go to this page and download the library: Download adrianmejias/veil 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/ */
adrianmejias / veil example snippets
drianMejias\Veil\Veil;
// Register the autoloader
$veil = (new Veil)->register();
// An example when setting up a flolder and composer psr-4
// autoload is setup as: "Veils\\": "src/Veils/"
// FooVeil class extends VeilAbstract with instance of loadable class
$veil->add([
'Foo' => Veils\FooVeil::class, // The alias name and abstract class to alias against.
]);
// $veil->add('Foo', Veils\FooVeil::class);
// An example if the bar method in the Foo class returned 'world'
echo 'Hello, ' . \Foo::bar() . '!';
// use Foo;
// ...
// echo 'Hello, ' . Foo::bar() . '!';