Skip to content

Instantly share code, notes, and snippets.

View solleer's full-sized avatar
🏠
Working from home

Richard solleer

🏠
Working from home
View GitHub Profile
@solleer
solleer / Readable.php
Last active April 12, 2017 01:26
Transphporm Readable Formatter
<?php
namespace Config\Transphporm\Readable;
class Readable {
private function camelCase($val) {
$words = preg_split('/(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/', $val);
return implode(' ', $words);
}
public function readable($val, $splitOnDashes = false) {
@solleer
solleer / StaticPages.php
Last active March 8, 2016 12:11
Static Router Module
<?php
namespace Config\Router;
class StaticPages implements \Level2\Router\Rule {
private $dice;
private $static_dir;
public function __construct(\Dice\Dice $dice, $static_dir = 'Modules/Static', $layout_xml = 'Layouts/layout.xml') {
$this->dice = $dice;
$this->static_dir = $static_dir;
$this->layout_xml = $layout_xml;