for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Mcustiel\PowerRoute\Common\Factories;
class Mapping
{
protected $mapping = [];
public function __construct(array $mapping)
$this->mapping = array_merge($this->mapping, $mapping);
}
protected function checkMappingIsValid($mapping)
if (!isset($this->mapping[$mapping])) {
throw new \Exception();
public function addMapping($identifier, $class)
$this->mapping[$identifier] = $class;