Repository navigation
POS Directory Structure
Andy Theuninck edited this page Feb 14, 2015
·
4 revisions
From the project root, POS is found in the directory pos/is4c-nf. The pos directory is leftover from an old idea of having multiple point of sale interfaces that were all compatible with the underlying database structure. The is4c-nf name stands for "no frames" because the original IS4C involved several pages in a frameset.
Under pos/is4c-nf you will find:
- ajax-callbacks which contains request handlers for AJAX calls. It's one of the only sections of POS that is not currently object oriented. Request handlers typically accept data via both POST and GET interchangeably and return a JSON encoded response.
- css contains CSS files for POS
- graphics contains image files for POS. The most notable one is is4c.gif which is used as the background for POS. This file should be a symlink to minimize overwriting other peoples' logos via git.
- gui-class-lib contains a handful of base classes used for drawing POS pages.
- gui-modules contains the default set of pages for POS. Each of these inherits from one of the base classes in gui-class-lib. The "main" page of POS is named pos2.php for weird historical reasons.
-
install contains the scripts for installing POS' databases and managing configuration.
- install/data contains sample data in CSV or a psuedo-SQL format.
- lib is the deepest directory. It contains two fairly different things. One is library classes collecting common functionality that may be called from various places. These classes contain nothing but static methods. They're only implemented as classes for organizational purposes. The second thing lib contains is base classes for hookable, modular functionality. In many cases there are also a default set of modules.
- locale contains gettext language files. Internationalization is a very, very long-term project.
- log contains POS' error logs. PHP issues are logged in php-errors.log; SQL issues are logged in queries.log.
-
parser-class-lib contains classes used in POS' input processing.
- parser-class-lib/preparse contains PreParser classes. These are executed in the first stage of input processing.
- parser-class-lib/parse contains Parser classes. These are executed in the second stage of input processing.
- plugins contains optional functionality. Each plugin is a separate directory under plugins. The directory structure within the plugin may be whatever the author prefers.
-
scale-drivers contains code for interacting with low-level hardware
- scale-drivers/drivers contains different driver implementations. None of the current drivers are written in PHP. These run as an entirely separate process from the webserver.
- scale-drivers/php-wrappers contains PHP classes responsible for communication between the webserver and the driver process.
- test contains a handful of debugging scripts. None of these are executed during normal POS operations.
- unit-tests contains PHPUnit-based unit tests for POS.