THE WEST IS EMPTY

Funcdown Manual

Installation

Requirements

Other than PHP it self, funcdown has no special requirements nor installation. The only strong fact is that standard, good HTML and PHP knowledge is required in order for one to operate with funcdown properly. Speaking of PHP Version, >=7.3 is required where one also need to make sure that the following two PHP extensions are enabled: ctype and mbstring.

When and if those conditions are met, assuming that You have obtained funcdown code , and did according to the instructions there, You may throw an look at Basic Usage and start goofing with funcdown.

Configuration

Just like PHP it self, funcdown is using it's own .ini file, with it's default Runtime options, with few differences. It is masked as PHP (eg: .funcdown.conf.ini.php) and has a DOT as prefix for the filename and sits within PHP block comment. This is because it indicates that it is system (hidden) file on unix-alike production `boxes` (in 99.99% cases).

On well configured server, everything within a file that has .php extension, wrapped with php tags is invisible to `bystander/visitor` of any kind... and PHP simply doesn't give a dime about extension when it comes to parsing various x-text formats. All it takes is properly formatted content within. Valid syntax in other words. One plus for a bit of additional security, nothing else.


Basic Usage

Here are pseudo (functional and working) examples for three possible funcdown input types, how to parse/transform funcdown syntax to html markup.

INSTANCING
INPUT
OUTPUT

Somewhere in Your script, prefferably at the top of it ..

<?php require_once '/path/to/funcdown/extension.php'; $funcdown = new \H\Ext\Funcdown\ObjectInstance(5);

.. and than ->parse() funcdown source by using any of given INPUT methodology.

Funcdown code or input value for $funcdown->parse() method, can come in a form of value of PHP $variable (meaning directly as string as well), as valid filepath or as compliant array, just as given in the examples below.

STRING
ARRAY
FILEPATH

You write this ...

<?php $funcdown->parse('D [p {This is my paragraph text}]', false); echo $funcdown->release();

You write it like this ...

<?php $funcdown->parse ([ 'D' => [ // Capital D = div 'p' => 'This is my paragraph text' ] ], false); echo $funcdown->release();

While your_funcdown_file.fncd or your_funcdown_file.fncd.phtml, looks something like this ..

D [ p {This is my paragraph text} ]

.. you call it like this ..

<?php echo $funcdown->parse('/path/to/my_funcdown_file.fncd')->release();

Once when ->release() method has been called, be it string, array or external file, You will get the sample below.

<div> <p>This is my paragraph text</p> </div>

It simply doesn't matter whether funcdown is written as single liner or with a lots of space style, generated markup will be formatted in the same way, unless runtime option is modified.


Advanced Usage

THE EAST IS EMPTY
THE SOUTH IS EMPTY
?