========================
Emvicy commands
========================

help
    command:    php emvicy.php
        displays this help text

version | v
    command:    php emvicy.php v
        displays myMVC version

serve | s
    command:    php emvicy.php s
        provides a local php server

clearcache | cc
    command:    php emvicy.php cc
        clears all contents of cache directory:
        - /application/cache/

clearlog | cl
    command:    php emvicy.php cl
        clears all contents of log directory:
        - /application/log/

clearsession | cs
    command:    php emvicy.php cs
        clears all contents of session directory:
        - /application/session/

cleartemp | ct
    command:    php emvicy.php ct
        clears all contents of templates_c directory:
        - /application/templates_c/

clearall | ca
    command:    php emvicy.php ca
        clears all contents of temp directories:
        - /application/cache/
        - /application/log/
        - /application/session/
        - /application/templates_c/

modules | md
    command:    php emvicy.php md
        lists available modules in JSON format
        example:
        {"SECONDARY":{"0":"Captcha","1":"DB","2":"Email","4":"Idolon","5":"InfoService","6":"OpenApi"},"PRIMARY":["Emvicy"]}

datatype | dt
    command:    php emvicy.php dt               # creating datatype classes for all modules
                php emvicy.php dt module:Foo    # creating datatype classes for module `Foo`
        creates datatype classes for a given module or for all modules (default)

update | up
    command:    php emvicy.php up
        updates
            - myMVC Framework and its vendor installed libraries
            - vendor installed libraries of existing modules
        requires:
            - myMVC installed via `git clone` command
            - bash, git

log
    command:    php emvicy.php log id:{id} nl:true|false
                php emvicy.php log id:{id} nl:1|0
        aggregates a unique log extract on STDOUT from all existing logfiles (*.log) matching to given logId (=== MVC_UNIQUE_ID)
        ------------------------------------------------------------------------------------------
        examples:
        php emvicy.php log id:2023070711413964a7ddd36254a       # aggregates a unique log extract
        php emvicy.php log id:2023070711413964a7ddd36254a nl:0  # same
        php emvicy.php log id:2023070711413964a7ddd36254a nl:1  # replaces newline \n by a real linebreak
        ------------------------------------------------------------------------------------------
        requires:
            - bash, grep, awk, sort, sed

lint | l
    command:    php emvicy.php lint module:Foo  # checks module "Foo" on errors
                php emvicy.php lint             # checks the whole application on errors
        checks all codes on errors and returns a parsable JSON containing bool `bSuccess` and array `aMessage`.
        Examples
            no errors found
                {
                  "bSuccess": true,
                  "aMessage": []
                }
            syntax error
                {
                  "bSuccess": false,
                  "aMessage": [
                    "PHP Parse error:  syntax error, unexpected token \"}\" in /var/www/myMVC_3.2.x/modules/Foo/Controller/Index.php on line 30",
                    "Errors parsing /var/www/myMVC_3.2.x/modules/Foo/Controller/Index.php"
                  ]
                }
        requires:
            - bash, grep, find

create | c
    primary module creation
        ------------------------------------------------------------------------------------------
        command:
        php emvicy.php c module:foo                         # creates primary module "Foo"; asks if modulename is correct
        php emvicy.php c module:foo force:no                # same
        php emvicy.php c module:foo force:yes               # no asking - instantly creating of primary module "Foo"
        php emvicy.php c module:foo primary:yes             # creates primary module "Foo"; asks if modulename is correct
        php emvicy.php c module:foo primary:yes force:no    # same
        php emvicy.php c module:foo primary:yes force:yes   # no asking - instantly creating of primary module "Foo"
        ------------------------------------------------------------------------------------------

    secondary module creation
        ------------------------------------------------------------------------------------------
        command:
        php emvicy.php c module:bar primary:no force:no     # creates module "Bar" as a secondary module; asks if modulename is correct
        php emvicy.php c module:bar primary:no force:yes    # no asking - instantly creating of secondary module "Baz"
        ------------------------------------------------------------------------------------------

    the creation of the necessary environment config file (e.g. 'develop.php') during this module creation process
    depends on which `MVC_ENV` is set in `/.env`.


