<?php
namespace App\GenDocument\Vars; class ConfigMock { private $backend = null; public function __construct(\App\GenDocument\Vars\ConfigAbstract $backend) { $this->backend = $backend; } public function getValue($field) { switch ($this->backend->getType($field)) { case 'numeric': return 1; break; case 'date': return '2000-01-02 03:04:05'; break; case 'string': case 'text': return 'sample'; break; } return null; } public function exists($field) { return $this->backend->exists($field); } } 