public function getLocationsAsArray()
    {
        // iterate over the location nodes and sort them into an array
        $locations = array();
        /** @var \AppserverIo\Appserver\Core\Api\Node\LocationNode $locationNode */
        foreach ($this->getLocations() as $locationNode) {
            // restructure to an array
            $locations[$locationNode->getCondition()] = array(
                'condition' => $locationNode->getCondition(),
                'params'    => $locationNode->getParamsAsArray(),
                'handlers' =>  $locationNode->getFileHandlersAsArray(),
                'headers' =>  $locationNode->getHeadersAsArray()
            );
        }

        // return what we got
        return $locations;
    }