Devise\Pages\Viewvars\DataBuilder::processQueue PHP Method

processQueue() private method

Process queue takes an array and gets the computed value of each value from the array. It populates $this->data which is used later by the view composer when it calls the getData() method.
private processQueue ( array $queue ) : void
$queue array
return void
    private function processQueue($queue)
    {
        $failures = array();
        foreach ($queue as $varName => $var) {
            $value = $this->getValue($var);
            if ($value !== DataCrawler::PARAM_NOT_FOUND) {
                $this->data[$varName] = $value;
            } else {
                $failures[$varName] = $var;
            }
        }
        if (count($failures)) {
            // only some items failed trying again with $var instead of $value
            // eventually this should return false so we don't run into an
            // infinite loop b/c eventually count of both variables will be same
            if (count($failures) < count($queue)) {
                $this->processQueue($failures);
            } else {
                $this->fillWithNulls($failures);
            }
        }
    }