protected function addValidators(Application $app)
    {
        if (!isset($app['validator'])) {
            throw new Exception\MissingDependencyException('The validator manager is missing');
        }

        $provider = $this;
        $app['validator'] = $app->share(
            $app->extend(
                'validator',
                function ($validatorManager) use ($provider) {
                    return $provider->attachValidators($validatorManager);
                }
            )
        );
    }
protected function addValidators(Application $app)
    {
        if (!isset($app['validator'])) {
            throw new Exception\MissingDependencyException('The validator manager is missing');
        }

        $provider = $this;
        $app['validator'] = $app->share(
            $app->extend(
                'validator',
                function ($validatorManager) use ($provider) {
                    return $provider->attachValidators($validatorManager);
                }
            )
        );
    }
protected function addValidators ( Application $ app ) { if ( ! isset ( $ app [ 'validator' ] ) ) { throw new Exception \ MissingDependencyException ( 'The validator manager is missing' ) ; } $ provider = $ this ; $ app [ 'validator' ] = $ app -> share ( $ app -> extend ( 'validator' , function ( $ validatorManager ) use ( $ provider ) { return $ provider -> attachValidators ( $ validatorManager ) ; } ) ) ; }
Adds validators for the descriptors to the validator manager.

@param Application $app

@throws Exception\MissingDependencyException if the validator could not be found.

@return void
Adds validators for the descriptors to the validator manager .