protected function resolve($type, array $data)
    {
        if ($this->registered($type)) {
            $f = $this->registry[$type];
            if ($f instanceof Closure) {
                return $f($data, $this->app);
            } else {
                return new $f($data);
            }
        } else {
            throw new Exception("Field type $type not registered");
        }
    }
protected function resolve($type, array $data)
    {
        if ($this->registered($type)) {
            $f = $this->registry[$type];
            if ($f instanceof Closure) {
                return $f($data, $this->app);
            } else {
                return new $f($data);
            }
        } else {
            throw new Exception("Field type $type not registered");
        }
    }
protected function resolve ( $ type , array $ data ) { if ( $ this -> registered ( $ type ) ) { $ f = $ this -> registry [ $ type ] ; if ( $ f instanceof Closure ) { return $ f ( $ data , $ this -> app ) ; } else { return new $ f ( $ data ) ; } } else { throw new Exception ( "Field type $type not registered" ) ; } }
Resolve a field object using its type, from the registered factory
functions.

@param  string                         $type Field type
@param  array                          $data Field data
@return \Tev\Field\Model\AbstractField       Field object

@throws \Exception If field type is not registered
Resolve a field object using its type from the registered factory functions .