1. Go to this page and download the library: Download vinou/site-builder 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/ */
vinou / site-builder example snippets
ne('VINOU_ROOT', realpath('./'));
define('VINOU_MODE', 'Shop');
define('VINOU_CONFIG_DIR', '../config/');
$session = new \Vinou\ApiConnector\Session\Session();
$session::setValue('language', 'de');
$site = new \Vinou\SiteBuilder\Site();
$site->setRouteFile('routes.yml');
$site->loadTheme('my-theme', 'Theme/MyTheme/');
$site->run();
namespace YourVendor\YourNamespace\Processors;
class YourProcessor extends \Vinou\SiteBuilder\Processors\AbstractProcessor {
public function dataMagic($data = null) {
// transform data here
return $data;
}
}
$site = new \Vinou\SiteBuilder\Site();
$site->render->loadProcessor('myprocessor', new \YourVendor\YourNamespace\Processors\YourProcessor());
$site->run();