Cascade\Config\Loader\ClassLoader\HandlerLoader::populateProcessors PHP Method

populateProcessors() private method

Replace the processors in the option array with the corresponding callable from the array of loaded and callable processors, if it exists.
private populateProcessors ( array &$handlerOptions, array $processors )
$handlerOptions array
$processors array Array of processors to pick from
    private function populateProcessors(array &$handlerOptions, array $processors)
    {
        $processorArray = array();
        if (isset($handlerOptions['processors'])) {
            foreach ($handlerOptions['processors'] as $processorId) {
                if (isset($processors[$processorId])) {
                    $processorArray[] = $processors[$processorId];
                } else {
                    throw new \InvalidArgumentException(sprintf('Cannot add processor "%s" to the handler. Processor not found.', $processorId));
                }
            }
            $handlerOptions['processors'] = $processorArray;
        }
    }