Monday 15 August 2011

zend framework - Apigility content validator - enable to fetch service validator -



zend framework - Apigility content validator - enable to fetch service validator -

i next tutorials on https://apigility.org/documentation/content-validation/basic-usage. but, when tried inject input filter service addressbook\v1\rest\contact\validator in contactresource, next error:

zend\servicemanager\exception\servicenotfoundexception file: /users/.../src/apigility-tutorials/vendor/zendframework/zendframework/library/zend/servicemanager/servicemanager.php:529 message: zend\servicemanager\servicemanager::get unable fetch or create instance addressbook\v1\rest\contact\validator

i not sure if it's issue apigility itself, why i'm asking if illustration shown in link above works when using dependency injection. thanks

got it. according zf-content-validation doc, input filter registered through zend\inputfilter\inputfilterpluginmanager means have inputfiltermanager service first contact input filter service follows:

$inputfilter = $servicelocator->get('inputfiltermanager') ->get('addressbook\v1\rest\contact\validator');

thanks looking it.

zend-framework apigility

No comments:

Post a Comment