You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Franck Paul b7f1d1803a
Reverse last commit
2 years ago
bin Fix issue with __getMacro() methods introduce in previous commit 9 years ago
common Reverse last commit 2 years ago
dblayer Setting CHARACTER_SET_DATABASE system variable is obsolete with MySQL 8+ (https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_character_set_database) 3 years ago
dbschema PHP 5.4+, short notation for array 4 years ago
debian Use https rather than http 3 years ago
diff PHP 5.4+, short notation for array 4 years ago
ext PHP 5.4+, short notation for array 4 years ago
filemanager PHP 5.4+, short notation for array 4 years ago
html.filter PHP 5.4+, short notation for array 4 years ago
html.validator PHP 5.4+, short notation for array 4 years ago
image WebP image format support 4 years ago
mail PHP 5.4+, short notation for array 4 years ago
mail.convert PHP 5.4+, short notation for array 4 years ago
mail.mime PHP 5.4+, short notation for array 4 years ago
net PHP 5.4+, short notation for array 4 years ago
net.http WebP image format support 4 years ago
net.http.feed PHP 5.4+, short notation for array 4 years ago
net.nntp PHP 5.4+, short notation for array 4 years ago
net.xmlrpc PHP 5.4+, short notation for array 4 years ago
pager Simplify licence block at the beginning of each file, add licence information in README, add license file (text format) 5 years ago
rest PHP 5.4+, short notation for array 4 years ago
session.db PHP 5.4+, short notation for array 4 years ago
template PHP 5.4+, short notation for array 4 years ago
tests/unit Add support for <span>…</span>, syntax: ;;…;; 2 years ago
text.wiki2xhtml Add support for <span>…</span>, syntax: ;;…;; 2 years ago
url.handler PHP 5.4+, short notation for array 4 years ago
xmlsql Simplify licence block at the beginning of each file, add licence information in README, add license file (text format) 5 years ago
zip Cope with null value set for memory_limit too 4 years ago
.atoum.coverage.php Update atoum environment, add coverage reporting 5 years ago
.atoum.php Add xunit report for atoum unit tests 3 years ago
.doxygen.conf Doxygen config adjustment 5 years ago
.editorconfig Config for Makefile editor 3 years ago
.gitignore Track .gitignore 3 years ago
LICENSE Simplify licence block at the beginning of each file, add licence information in README, add license file (text format) 5 years ago
Makefile tests directory must not be included in distribution 9 years ago
README.md Update README (switch from hg to git), PHP 5.6+ required 3 years ago
_common.php Remove dbQuery from Clearbricks (moved to dbquery branch) 5 years ago
composer.json Update README (switch from hg to git), PHP 5.6+ required 3 years ago
composer.lock Composer update 2 years ago

README.md

Clearbricks

What is this?

No, Clearbricks is not yet another framework. Clearbricks is not cool at all and does not even have a nice website. It won't make you smart neither have great ideas for you.

Clearbricks is only about code and efficiency, consider it as a toolbox. And please, do me a favor, don't call it a framework :-)

How do I use it?

Clearbricks is about "using what we need when we need it". Pick the module(s) you need and add it to your code. The only thing you'll always need is the "common" directory.

Once you're ready, you have to create a _common.php file on top of your Clearbricks path (or wherever you want) and add $__autoload entries for your modules.

Take a look at the _common.php file.

Of course, you're encouraged to use the $__autoload magic for your own classes.

Requirements

In order to use Clearbricks you need:

  • PHP 5.6 with the following modules:
    • mbstring
    • iconv
    • simplexml

Use it with Git

You may think that all this subdirectories is a mess. You're quite right. But one day, you'll find it cool to use Clearbricks modules in your git repository as a submodule. This day, you'll love me :-)

Here is an example of using Clearbricks and dbLayer in your own repository as an external property, using submodule documentation:

git submodule add git@git.dotclear.org:dev/clearbricks.git path/to/clearbricks

Commit and push, then pull the submodule:

git submodule update --init --recursive

Then, you can create a _common.php file wich will contain:

<?php
require dirname(__FILE__).'/common/_main.php';
$__autoload['dbLayer'] = dirname(__FILE__).'/dblayer/dblayer.php';

You're done!

API documentation

A doxygen configuration file is provided to generate the Clearbricks API documentation which will be readable in doxygen folder:

doxygen .doxygen.conf

Tests

Clearbricks classes are tested using atoum (see doc). To run tests,

Clone this repository:

git clone https://git.dotclear.org/dev/clearbricks.git

Download the composer.phar executable or use the installer.

curl -sS https://getcomposer.org/installer | php

You may also install composer with:

apt install composer

Update dependencies via composer:

composer.phar install

And now can run tests:

./bin/atoum

Add -ebpc option to enable path and branch coverage (this option requires xDebug 2.3+)

You can also get code coverage report (in coverage/html) for tests by runing:

./bin/atoum -c .atoum.coverage.php

License

Copyright Olivier Meunier & Association Dotclear

GPL-2.0-only

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.