我有此代码:
$settingsModel = new Settings();
$hydrator = new ReflectionHydrator();
$incomingData = array('[meta_title]' => 'CMS');
$datas = $hydrator->hydrate($incomingData, $settingsModel);
当我打印$ datas时,我得到一个空对象
Admin\Model\Settings Object
(
)
我的控制器最重要的是:
use Zend\Hydrator;
use ReflectionClass;
use Zend\Hydrator\Reflection as ReflectionHydrator;
有什么建议吗?