Download the PHP package 4asuite/nano-php without Composer

On this page you can find all versions of the php package 4asuite/nano-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nano-php

Nano PHP

A minimal PHP microframework. No magic, no bloat — just routing, controllers, views, and a few security essentials.

Author: Vlado Majoros, 4aSuite License: MIT


Requirements


Installation

Point your web server document root to the public/ directory. Open the project in a browser — the welcome page confirms the framework is running.


Project structure


Configuration

Copy .env.example to .env and adjust as needed. Values are exposed as PHP constants.

Dot-notation keys (DB.HOST) are grouped into a single array constant DB['HOST'].


Routing

Define routes in App/Config/routes.php:

Route parameter types:

Syntax Matches Example
(:num:id) Digits only /users/42
(:any:slug) Any non-slash string /posts/hello-world

A missing route throws HttpException(404), which the framework handles automatically.


Controllers

Extend App\Core\Controller. Every action must return a Response instance.

Available in every controller:

Method Description
$this->request->get($key) GET parameter
$this->request->post($key) POST parameter
$this->request->input($key) POST or GET
$this->request->method() HTTP method string
$this->request->path() Normalized URL path
$this->view($view, $data, $layout) Render view → Response
$this->json($data, $status) JSON response
$this->redirect($url, $code) Redirect (internal only)

Views

View files live in App/views/. Pass data as an associative array — keys become variables inside the template.

Use the global e() helper to escape output (htmlspecialchars wrapper).

Layouts live in App/views/layouts/. The rendered view is passed as $content:

Built-in layouts: main (full HTML5), blank (raw output, no wrapper).


Session

Cookies are configured with httponly, samesite=Lax, use_strict_mode. secure flag is set automatically when HTTPS is detected.


CSRF

Token is 64-character hex (random_bytes(32)), stored in session, rotated on each verification.


Language / Translations

Translation keys are uppercased and defined as PHP constants. Falls back to the key name if not defined.


Security headers

Sent automatically on every response:

Override any header via $this->response->header($key, $value) before returning from the controller.


HTTP errors

Throw HttpException from anywhere — the framework catches it and sends the appropriate HTTP status:


License

MIT © Vlado Majoros, 4aSuite


All versions of nano-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package 4asuite/nano-php contains the following files

Loading the files please wait ...