New class: PathFinder

Saturday, April 17th, 2010|Core changes, Version 3|by Romans

Several of current components are relying on their own implementation for file searching:

  • SMLite – template inclusion
  • class auto-load
  • javascript inclusion
  • page search

PathFinder is designed to be a system-wide controller which will take all those searches under control. It introduces concepts of Locations and resource types (such as ‘js’, ‘html’ for templates, ‘php’ etc)

Structured APIs will automatically include PathFinder and will supply $api->locate($type,$filename) and $api->addLocation($location,$contents) function.

$contents is passed as array of $type=>’subdirectory’.