Zend Framework 3 Hydrator

时间:2018-10-03 00:22:31

标签: zend-framework3 zend-hydrator

我有此代码:

        $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;

有什么建议吗?

0 个答案:

没有答案