File code/addon/Server.php

class Lia\Addon\Server

A very bad integration of the Router & other addons & utility classes that makes it easy to send a response

Constants

Properties

  • public $fqn = 'lia:server.server';
  • public $bufferResponse = true; true to flush the output buffer after sending headers & echoing response
  • public $useTheme = true; true to enable theme
    false to disable theme

Methods

  • public function __construct($lia=null, $namenull)

  • public function protocol()

  • public function urlWithDomain($relativeUrl)

  • public function getResponse($url=null, $methodnull)

  • public function apply_theme($route, $response) Applies the theme (if response->useTheme & server->useTheme are true)

  • public function process_route($route, $response) Process a route & setup the response's content & headers

  • public function try_redirect_to_corrected_url($url, $method) This is a sloppy bad function that needs rewritten

  • public function send_response($response)

  • public function deliver($url=null, $methodnull)

  • protected function closeConnection() Close the connection with client. May not work on all hosts, due to apache/server configuration, I'm pretty sure.

  • public function requirePhpFileRoute($route,$response)

  • public function getDistinctRoute($routeList)