/** * Renders the expendable around the array analysis. * * @return string * The generated markup. */ public function callMe() { $output = ''; $recursionMarker = $this->storage->recursionHandler->getMarker(); $output .= $this->storage->render->renderSingeChildHr(); // Iterate through. foreach ($this->parameters['data'] as $key => &$value) { // We will not output our recursion marker. // Meh, the only reason for the recursion marker // in arrays is because of the $GLOBAL array, which // we will only render once. if ($key === $recursionMarker) { continue; } if (is_string($key)) { $key = $this->storage->encodeString($key); } $model = new Model($this->storage); // Are we dealing with multiline code generation? if ($this->parameters['multiline'] === true) { // Here we tel the Codegen service that we need some // special handling. $model->setMultiLineCodeGen('iterator_to_array'); } if (is_string($key)) { $model->setData($value)->setName($key)->setConnector1('[\'')->setConnector2('\']'); } else { $model->setData($value)->setName($key)->setConnector1('[')->setConnector2(']'); } $output .= $this->storage->routing->analysisHub($model); } $output .= $this->storage->render->renderSingeChildHr(); return $output; }