ZF\Apigility\Admin\InputFilter\RpcService\PostInputFilter::init PHP Method

init() public method

public init ( )
    public function init()
    {
        $this->add(['name' => 'service_name', 'validators' => [['name' => \ZF\Apigility\Admin\InputFilter\Validator\ServiceNameValidator::class]], 'error_message' => 'Service Name is required, and must be a valid PHP class name']);
        $this->add(['name' => 'route_match', 'error_message' => 'Route Match is required, and must be a valid URI path']);
    }

Usage Example

 public function init()
 {
     parent::init();
     $this->add(['name' => 'controller_class', 'required' => true, 'error_message' => 'The Controller Class must be a valid, fully qualified, PHP class name']);
     $this->add(['name' => 'accept_whitelist', 'validators' => [['name' => MediaTypeArrayValidator::class]], 'error_message' => 'The Accept Whitelist must be an array of valid media type expressions']);
     $this->add(['name' => 'content_type_whitelist', 'validators' => [['name' => MediaTypeArrayValidator::class]], 'error_message' => 'The Content-Type Whitelist must be an array of valid media type expressions']);
     $this->add(['name' => 'selector', 'required' => false, 'allow_empty' => true, 'error_message' => 'The Content Negotiation Selector must be a valid,' . ' defined zf-content-negotiation selector name']);
     $this->add(['name' => 'http_methods', 'validators' => [['name' => HttpMethodArrayValidator::class]], 'error_message' => 'The HTTP Methods must be an array of valid HTTP method names']);
 }
PostInputFilter