Download the PHP package shaik-obydullah/lime-php-framework without Composer

On this page you can find all versions of the php package shaik-obydullah/lime-php-framework. 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 lime-php-framework

Lime PHP Framework

Latest Stable Version License

PHP MySQL GitHub Stars GitHub Forks

A lightweight, minimal PHP MVC framework with routing, database abstraction, migrations, and a simple templating engine. Designed for small to medium web applications.

Packagist

Available on Packagist.

Documentation

Features

Requirements

Installation

Via Composer (Recommended)

Manual Installation

Copy the contents of this repository into your project root:

2. Install dependencies

3. Configure environment

Copy .env and set your database credentials:

4. Run migrations

5. Serve the application

Point your browser to http://localhost:8000.

Directory Structure

Routing

Define routes in App/Router/web.php:

Available methods

Method Description
Router::get($uri, $handler) Register a GET route
Router::post($uri, $handler) Register a POST route
Router::match($methods, $uri, $handler) Register for multiple HTTP methods

Route handlers follow the format: ControllerName@methodName

URL Parameters

Parameters are defined with curly braces and passed as method arguments:

Controllers

Controllers extend Lime\Controller and are placed in App/Controller/ under the App\Controller namespace.

Base Controller Methods

Method Description
$this->view($path, $data) Render a view with data
$this->redirect($url) Redirect to a URL
$this->json($data, $status) Return JSON response

Views

Views are plain PHP files in App/View/. Data passed from the controller is extracted as variables.

View paths use dots for subdirectories: home/index maps to App/View/home/index.php.

Database

The Lime\Database class provides a singleton PDO connection and helper methods.

Methods

Method Returns Description
Database::connect() PDO Get the singleton PDO instance
Database::query($sql, $params) PDOStatement Execute a prepared query
Database::fetch($sql, $params) ?array Fetch one row or null
Database::fetchAll($sql, $params) array Fetch all rows
Database::insert($sql, $params) int Insert and return lastInsertId
Database::execute($sql, $params) int Execute and return rowCount

All queries use prepared statements with automatic parameter binding for security.

Models

Models extend Lime\Model and provide direct database access. They share the same PDO connection.

Model Methods

Method Returns Description
Model::query($sql, $params) PDOStatement Execute a prepared query
Model::fetchAll($sql, $params) array Fetch all rows
Model::fetchOne($sql, $params) ?array Fetch one row or null
Model::execute($sql, $params) int Execute and return lastInsertId

Migrations

Migration files are SQL files placed in App/Database/Migrations/. They are executed in filename order.

Creating a migration

Create a file like 001_create_users.sql:

Running migrations

Migrations are tracked in a migrations table. Only files that haven't been run yet will execute.

Environment Configuration

The framework loads a .env file from the project root. Variables are available via $_ENV and getenv().

Lines starting with # are treated as comments. The .env file should NOT be committed to version control.

Serving in Production

Apache

The included .htaccess files handle URL rewriting. Ensure mod_rewrite is enabled and AllowOverride All is set for the document root.

Nginx

Architecture Overview

Request Lifecycle

  1. .htaccess rewrites all requests to Public/index.php
  2. index.php blocks direct access to internal directories
  3. System/Bootstrap.php loads environment, registers autoloader, loads routes
  4. Router::dispatch() matches the request URI and method
  5. The matched controller method is called with extracted parameters
  6. The controller renders a view or returns a JSON response

Namespace Mapping

Namespace Directory
Lime\ System/
App\ App/

The autoloader in Bootstrap.php handles PSR-4-style class loading for both namespaces.

Security

License

MIT


All versions of lime-php-framework 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 shaik-obydullah/lime-php-framework contains the following files

Loading the files please wait ...