1. Go to this page and download the library: Download staticka/console 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/ */
php
// src/Package.php
namespace Ciacme;
use Rougin\Slytherin\Container\ContainerInterface;
use Rougin\Slytherin\Container\ReflectionContainer;
use Rougin\Slytherin\Integration\Configuration;
use Rougin\Slytherin\Integration\IntegrationInterface;
class Package implements IntegrationInterface
{
public function define(ContainerInterface $container, Configuration $config)
{
// Will try to access the "config/parser.php" file ---
/** @var class-string[] */
$filters = $config->get('parser.filters', array());
// ---------------------------------------------------
// ...
}
}
php
// src/Package.php
namespace Ciacme;
use Rougin\Slytherin\Container\ContainerInterface;
use Rougin\Slytherin\Container\ReflectionContainer;
use Rougin\Slytherin\Integration\Configuration;
use Rougin\Slytherin\Integration\IntegrationInterface;
use Staticka\Filter\HtmlMinifier;
use Staticka\Layout;
class Package implements IntegrationInterface
{
/**
* This sample package will always minify the compiled HTML files.
*
* @param \Rougin\Slytherin\Container\ContainerInterface $container
* @param \Rougin\Slytherin\Integration\Configuration $config
*
* @return \Rougin\Slytherin\Container\ContainerInterface
*/
public function define(ContainerInterface $container, Configuration $config)
{
$layout = new Layout;
$layout->addFilter(new HtmlMinifier);
$container->set(get_class($layout), $layout);
return $container;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.