GiriGiriPHP
home | about | download | how to


Flattr this
Ease of use GiriGiri is easy for medium to advanced level PHP coders to use, despite it uses the OOP concept, and the new concept of singletons.

Intermediate PHP coders If you arent an advanced user or do not know OOP, all you will need to do will be to memorize various actions to modify the system.

Like, how do you refer to an array in a singleton. For example, a variable carrying the value of a language key in the global singleton for the main page is

$gb->lang['page']['ALANGUAGEKEY']

Any reference like that, will point to the value that is assigned to that key.

Or, any action is contained in the module actions. Like $user->actions('actiona') will tell the user singleton/module, to run the action 'actiona'. So, all you will need to create new actions will be to only go and add new case-switch blocks to the module you want to place it in.

You can have the output of that action in a variable in that singleton, like $randomoutput, and then you can assign that into a key in the content stash, like

$tp->in['page']['ACTIONA']=$randomoutput

Or, you can add it to the normal page output by appending it to page output key like

$tp->in['page']['T_PAGE_OUTPUT'].$randomoutput

or using the template class's append method

$tp->ins('T_PAGE_OUTPUT',$randomoutput)

All of these will result in appending of your new action output to the page output.

In ALL your procedures in the actions contained in the existing or new case-switch block you added, you can do ANY kind of code as you like. What happens there, stays there. The only thing you need to do, is to just add the final output (or any intermediate output that is needed) to global template keys to make them appear in the page.

With GiriGiri, messing with template files is a breeze. Just save a plain html file as .tpl extension, and you have a template insert that you can use anywhere. Be it forms, be it graphical/javascript constructs, you can approach them the same -> save them as plain text .tpl files, sprinkle keys into them, and then populate those keys in your module-actions.

Advanced PHP coders If you are an advanced php coder, then for you, it will be a breeze to do anything with GiriGiri. GiriGiri doesnt limit you to ANYthing like the other frameworks/codebases do. It is just a reader and dispatcher of created output, and a separator and miniaturizer of procedures.

You can just read about the coding logic of GiriGiri, or, see a few how-tos, and you will have probably grasped the essence of it already. Not to mention that, it is essentially basic OOP PHP code, built on the KISS principle. That simplicity will provide wiggle room for you as an advanced PHP coder.