1. Go to this page and download the library: Download mzdr/oh-snap 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/ */
mzdr / oh-snap example snippets
eague\BooBoo\BooBoo;
use mzdr\OhSnap\Formatter\PrettyFormatter;
// Options array for adjusting formatter behaviour.
// Default values are shown below.
$options = [
// List of CSS files to include in the (default) template.
'theme' => ['default'],
// Path to custom template file.
'template' => null,
// If set to true, code preview will not contain the
// whole file but the amount of lines defined in excerptSize.
'excerptOnly' => false,
// Amount of lines the code preview should have…
'excerptSize' => 20,
// Optional header/footer content to show. May be a path
// to a file that should be
$options = [
// Building on top of default styles…
'theme' => ['default', 'path/to/your.css', 'a { color: pink; }'],
// Using different stylesheet…
'theme' => ['path/to/your.css'],
// Using no styles at all? ¯\_(ツ)_/¯
'theme' => [],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.