Liaison

Liaison ties everything together. Packages & their components, view lookups, config values, routing, events, and more??

WARNING

I'm not sure if these docs are accurate any more.

$lia, Methods to know

  • deliver($url=null, $method=null)
    • uses the requested url by default, but you can pass in a url, which may include a get string like ?cats=cute
  • addPackage($options): $options is an array
    • dir: The root directory of your package
    • name: The name to be used for retrieving your package.
      -Each package must have a unique name
  • package($name): retrieve a package by name
  • packages(): A list of packages
  • compo($name): For each package, get any components named $name.
    • 0 components found, return null, 1 component found, return the component, 2+ components found, throw an exception
  • set($key, $value) & get($key,$valueIfNotFound): Store & retrieve values across the $lia instance
  • view($name, $passthru): Get a view (from any package) by $name, passing $passthru to the view.
    • See Views for more information
  • register($eventName, $object, $method=null): Register the event to be executed
  • send($eventName,$arg1, $arg2, $arg3, ....): Execute the given event, passing the list of args along.