Basics of FlowBasis EnvironmentFlowBasis provides a rich environment within which applications can be developed. Here we cover a few basics you should be familiar with if you are building on top of FlowBasis. Class Autoloader - No more require_once('/some/path') everywhereFlowBasis sets up a class autoloader, so you can use classes within your application without having to manually "include" or "require" files. For instance, if you want to use the FlowBasis_Util_StringHelper class, you can just use it in your code. The Zend framework library is also included with FlowBasis, so you can fire up the HTTP client with: $client = new Zend_Http_Client(); There's no need for you to include any files beforehand. Classes can be placed into the "core-classes" or "classes" directories and the filename should be the same as the class with the underscores replaced by directory separators. So, FlowBasis_Util_StringHelper is located at "core-classes/FlowBasis/Util/StringHelper.php" and Zend_Http_Client is located at "core-classes/Zend/Http/Client.php". FlowBasis Class - Central Point of CoordinationThe FlowBasis class -- defined at "core-classes/FlowBasis.php" -- provides a central point of coordination. You will go to the FlowBasis class to get access to the feature managers that provide access to the different components of FlowBasis -- such as FlowBasis::getAccountManager, FlowBasis::getRatingsManager, etc. The FlowBasis class also provides information about the current request. FlowBasis::getUser() returns an object representing the active client user and FlowBasis::getRoutePathInfo() returns an object containing information about how the request has been routed. If you're trying to get access to part of the FlowBasis infrastructure, the FlowBasis class likely holds the key. |