tgrj/tweb_core

minimalistic framework core

Maintainers

Package info

codeberg.org/tgrj/tweb_core

pkg:composer/tgrj/tweb_core

Statistics

Installs: 1

Dependents: 2

Suggesters: 0

v0.0.7 2026-03-04 21:59 UTC

This package is auto-updated.

Last update: 2026-03-04 22:31:05 UTC


README

minimalistic framework core

About

I wanted to have some really minimalistic PHP framework. I like noodlehaus/dispatch. Still I wanted to have some further stuff on top of it; e.g. with this package some kind of auto loading of the routes.

It also contains some basic config system.

It is a class less framework. All functions are also without a namespace.

First time doing such a thing with composer and packagist etc. on my own. I am just an amateur - so please use with care!

Usage

  • tweb_autoload(string $path)
    • With this function you can load either an absolute path or a relative path to the project folder and it will load all included PHP files ("require_once").
  • tweb_config(string $key)
    • This will get the config value of the given key. This key can be some better readable array-depth like for [ 'a' => [ 'aa' => 1, 'ab' => 2 ] ] you could use 'a.ab' as a key to get the config value 2. There is a default config (tweb.conf.php) in the modules src folder, By default you can create config/tweb.conf.php relative from the project path. It should return an array. This is able to overwrite the default values, but you can also have your own config keys and values. By overwriting the global variables $TWEB_CONFIG_PATH and $TWEB_CONFIG_FILE you can define in which folder the user config is stored. You should change these values before calling tweb_config() for the first time.