PHP code example of kss-php / bridge-bundle
1. Go to this page and download the library: Download kss-php/bridge-bundle 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/ */
kss-php / bridge-bundle example snippets
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Kss\Bundle\KssBundle\KssBridgeBundle(),
);
}
namespace Kss\Bundle\BridgeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Kss\Parser;
class ExampleController extends Controller
{
/**
* @Route("/styleguide")
* @Template
*/
public function styleguideAction()
{
$kss = new Parser($this->getRequest()->server->get('DOCUMENT_ROOT') . '/bundles/kssbridge/css');
return array(
'kss' => $kss,
);
}
}