This step rechecks the Step 1.1 which is the Vhost Setup just to check
that everything fine.
@return \Zend\View\Model\JsonModel
961449
public function checkVhostSetupAction()
    {
        $success = 0;
        $errors = [];

        if ($this->getRequest()->isXmlHttpRequest()) {
            $response = $this->vHostSetupChecker();
            $success = $response['success'];
            $errors = $response['errors'];

            // add status to session
            $container = new Container('melisinstaller');
            $container['steps'][$this->steps[1]] = ['page' => 2, 'success' => $success];
        }

        return new JsonModel([
            'success' => $success,
            'errors' => $errors,
        ]);
    }
840621
public function jsonSerialize()
    {
        return array_map(function($value)
        {
            if($value instanceof JsonSerialize)
                return $value->jsonSerialize();
            elseif($value instanceof  JsonInterface)
                return json_decode($value->toJson(), true);
            elseif($value instanceof ArrayInterface)
                return $value->toArray();
            else
                return $value;

        }, $this->attributes);
    }
716365
public function toJSON()
    {
        $result = [
            'Status' => $this->Status(),
            'ShouldPass' => $this->ShouldPass(),
            'Checks' => []
        ];
        foreach ($this->details as $detail) {
            $result['Checks'][] = $detail->toMap();
        }
        return json_encode($result);
    }
443545
public function cliAction()
    {
        $exitCode = $this->cliApplication->run(new RequestInput($this->getRequest()), $this->output);

        if (is_numeric($exitCode)) {
            $model = new ViewModel();
            $model->setErrorLevel($exitCode);

            return $model;
        }
    }
834393
public function getJson()
    {
        if (!isset($this->json)) {
            $this->json = json_decode($this->getProp('dump-single-json'));
        }

        return $this->json;
    }
240631
public function toJson()
    {
        $json = array();

        $json['name'] = $this->getName();
        $json['privacy'] = $this->getPrivacy();
        //Parameters for PUT call (Room already exists)
        if ($this->getId()) {
            $json['is_archived'] = $this->isArchived();
            $json['is_guest_accessible'] = $this->isGuestAccessible();
            $json['topic'] = $this->getTopic();
            $json['owner'] = array('id' => $this->getOwner()->getId());
        } else { //Paramters for POST call
            $json['guest_access'] = $this->isGuestAccessible();
            if ($this->getOwner()) {
                $json['owner_user_id'] = $this->getOwner()->getId();
            }
        }
        return $json;
    }
981361
public function toJson()
    {
        array_walk_recursive($this->params, function (&$value) {
            $value = (string) $value;
        });
        return json_encode($this->params);
    }
310002
public function jsonSerialize() {
    $valid = (!isset($this->ignoreDocumentMargin) ||
        $this->validateIgnoreDocumentMargin($this->ignoreDocumentMargin)) &&
      (!isset($this->ignoreDocumentGutter) ||
        $this->validateIgnoreDocumentGutter($this->ignoreDocumentGutter)) &&
      (!isset($this->minimumHeight) ||
        $this->validateMinimumHeight($this->minimumHeight));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
316085
public function indexAction()
    {
        // To begin the step of installation, the user must click "continue".
        if (! $this->params()->fromRoute('process')) {
            return new ViewModel();
        }

        $installation = $this->getInstallation();
        $redirect     = $this->getRedirect();
        $step         = $installation->getCurrentStep();
        $member       = $step->getCurrentMember();
        $service      = $this->getService();
        $validator    = $this->getValidator();

        foreach ($member as $item) {
            if (! $validator->isValid($item)) {
                if (! $service->process($item)) {
                    return new ViewModel([
                        'errors' => $service->getMessages()
                    ]);
                }
            }
        }
        return $this->redirect()->toUrl($redirect);
    }
758616
public function jsonSerialize()
    {
        $serializer = $this->localSerializer ?? static::$serializer;
        if ($serializer) {
            return is_string($serializer)
                ? $this->rawFormat($serializer)
                : call_user_func($serializer, $this);
        }

        return $this->toJSON();
    }
896888
private function jsonManager()
    {
        if($this->jsonManager === null)
            $this->jsonManager = new JsonManager($this, $this->jsonProperty);

        return $this->jsonManager;
    }
237775
public function jsonSerialize()
    {
        $properties = [
            '_templatePath', '_template', '_plugin', '_theme', '_layout', '_autoLayout',
            '_layoutPath', '_name', '_className', '_options', '_helpers'
        ];

        $array = [];

        foreach ($properties as $property) {
            $array[$property] = $this->{$property};
        }

        return array_filter($array, function ($i) {
            return !is_array($i) && strlen($i) || !empty($i);
        });
    }
44364
public function getJsonValidator()
    {
        if (!$this->jsonValidator) {
            $uriRetriever = new UriRetriever();

            // Load puli.io schemas from the schema/ directory
            $uriRetriever->setUriRetriever(new LocalUriRetriever());

            $this->jsonValidator = new JsonValidator(null, $uriRetriever);
        }

        return $this->jsonValidator;
    }
1260050
public function jsonSerialize()
    {
        // @codeCoverageIgnoreStart
        if ( ! $this->originalFilename()) {
            return [];
        }
        // @codeCoverageIgnoreEnd

        $data = [];

        foreach ($this->variants(true) as $variant) {
            $data[ $variant ] = [
                'path' => $this->variantPath($variant),
                'url'  => $this->url($variant)
            ];
        }

        return $data;
    }
1008013
public function locationsAction() 
	{
		$main = $this->getServiceLocator()->get('neobazaar.service.main');
		$locations = $main->getGeonamesEntityRepository()
        	->getLocationMultioptions($this->getServiceLocator());
		
		return new JsonModel(array('data' => $locations));
	}
1339844
public function jsonSerialize() {
        $ret = parent::jsonSerialize();
        $ret->id = $this->id;
        $ret->logicalConnectorWithNext = $this->logicalConnectorWithNext;
        $ret->negation = $this->negation;
        $ret->groupedWith = $this->groupedWith;

        return $ret;
    }
1017672
public function serialize()
    {
        $result = [
            'code' => $this->getCode(),
            'message' => $this->getMessage(),
            'errors' => $this->getErrors()
        ];

        $result['data'] = $this->getVariables();

        if ($result['data'] instanceof Traversable) {
            $result['data'] = ArrayUtils::iteratorToArray($result['data']);
        }

        if (null !== $this->jsonpCallback) {
            return $this->jsonpCallback . '(' . Json::encode($result) . ');';
        }

        return Json::encode($result);
    }