Fixed mapping issues

This commit is contained in:
Tim Nagel 2014-06-18 17:13:29 +10:00
commit 4e990e0cee
14 changed files with 454 additions and 238 deletions

View file

@ -18,14 +18,43 @@ class TypeConfig
*/
private $config;
/**
* @var array
*/
private $mapping;
/**
* @var string
*/
private $name;
public function __construct($name, array $config, array $prototype)
public function __construct($name, array $mapping, array $config = array())
{
$this->config = $config;
$this->mapping = $mapping;
$this->name = $name;
}
/**
* @return array
*/
public function getMapping()
{
return $this->mapping;
}
public function getModel()
{
return isset($this->config['persistence']['model']) ?
$this->config['persistence']['model'] :
null;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}