Here you can find documentation of core, functions, classes, and modules
For code snippets and usage see guides
Documentation is the key for anything, specially for high levels softwares. This is the main reason why this site is created.
It all started with two separate projects; a project manager inspired on dotproject.net at first, and a website called YoteConozco.com (co-developed with CGodia, and MPampols ) which is now closed. Both shared core parts, and was later on when we decided to name it ;) Setrill is a catalan word for a recipient that contains oil for cooking.
The project manager has been growing and has been deployed on companies. It's intended to be the core of the company, and includes anything, from clients/suppliers, opportunities, projects, accounting, and whatever you can imagine
The project is being developed using multiple private subversions repositories. Sources can be browsed and downloaded from this site. But there is no official repository available on github or any other site.
As a philosophy I have always considered that a company (and also individuals) may own the software it is using (and the data they are generating with). And that's is because i believe in opensource, because it usually (not always) allows you to improve it, and you are usually not stick to a system.
I completely disagree with current deployments of SaaS (Software as a Service), because nor only you can install the software (because usually web based), you are having credentials to use it. What could happens if the company providing the service denies your access (maybe without notifications?), or maybe it's closing it. What would you do with that data you have entered or generated using the application ? If you don't use the service, and close the relationship, what would happen if later on you need the data? Some cases, making a backup or exporting it's easy and doable, but on some applications, this is not as easy and you could lost some data in the process. This is the main reason because always I recomend having your data always accessible on something you own.
I also consider that you have always own and be accessible to your data, and not rely on 3rd parties. Nowadays we usually rely on documents that are available on multiple platforms, witch also includes invoices from companies and banking. But what could happen if sometime later you need it and they are not accessible? (maybe they have considered it's to old data.. who knows). Also if you need to share things with 3rd parties, i'll recommend you always to get the control over the share, for the same reason.
You may have been notice (or not) that there has been no questions on this site about cookies. It's not using them. No need to use them to get it working, and less need to give data to giants and 3rd parties. Only you must accept data treatment related to data processing if you create your login, because we are storing you email and some needed, to get you granted in the site. You can download the full source from here. (developed over Setrill, of course!)
If you like your work and find it useful, or you are using it, collaborate to get it bigger! ;)
Setrill needs php Version 7.
For web applications, requires Apache2 mod_rewrite module to be enabled.
Setrill main folders are
main php classes
common php procedures
each module can have a submodule, called section.
- module folder
- module section
- module folder
applicattion overrides. File Structure is the same as root folder.
deploy overrides. File Structure is the same as root folder.
Each folder under modules is considered a module
Application can define custom folders so they are considered part of a module. By default, modules can haves this folders
contains action request files.
data request files
console request files
contrains printing request files
folder, stores translations
This information is stored on CApp::module_structure , and it's comoon for all modules and sections.
When loading a file, the file loaded will be firstly search on Deploy, Secondly on Application, and finally on Main.
So any file could be overriden.
This is the core part, on modules will be installed
This is a customization for a certain application
This is a customization for a final client/location, intended for changing the appearance or specific things.
Classes can be extended to modify, alter, add behaviours on each escope. They must be named as
Css files can be served concatened when accessed as static file if named in this way. This ensures styles are correctly overrided
In the same way, js files can also be served concatened.
Js files, could be also concated reversely
At this moment, installation must be perfomed from terminal. Installation is performed using the install entry point.
Start of the application is always on files defined. Project files should never be accessed directly or bypassing the entry points.
Application type is stored on CApp:type
The aplication is run from terminal. It is the entry point for installation, and maintenance procedure. It's also been used on automatted runs, or long time exections.
Files are located on cron folder, and entry point file is cron.php
can also be started from application, using CApp:cron_file_exec
This is the typical entry points for a site. Files are located on root of module or section folder, and entry point file is index.php
Url file extension is .html
Content can be served as a data request. see getting content from a data call.
This is a request to get data from server, to be processed by client.
Url file extension is .xml parameters are usually set by get data
Files are located on data folder, and entry point file is xml.php
This is a request to modify data on server. Url file extension is .html and parameters are usually set by post data
Files are located on action folder, and entry point file is action.php
Static Data Request (images, css, js files)
The file is accessed on a location dependending on file extension. In case of css and js files on diferent scopes can be concatenated
The entry point file is static_server.php
The files are accessed on dms folder, and entry point file is file.php
When using alternatives we will not find the file on the file structure.
There is main config.php file on /config
Each module has it's own config.php file. Modules can have a predefined config file, called config.new. On first install the file es copied to config.php
As usual, logs should not be accessible and readable. They are placed on log folder.
Store logs outputs from php.
Store mysql queries.
Setrill and it's module documentation are based on this site.
Triggers are stored on internal var _triggers
Triggers can be added on app event OBJECT_SET_TRIGGERS or object defined events as 'cobject_set_triggers'
For triggers objects check object triggers