Download the PHP package tiao2/php-tools without Composer

On this page you can find all versions of the php package tiao2/php-tools. 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 php-tools

PHP Tools - Modular Website Building Toolkit

A modular PHP library for building websites with SSO authentication, community features, API gateway and unified exception handling.

Features

Requirements

Quick Start

1. Create project and install dependencies

Or clone the repository manually and run:

2. Configure environment variables

Copy .env.example to .env and adjust settings according to your environment:

Edit .env to set database connection, SSO expiration times, rate limiting parameters, etc. All modules are enabled by default and can be disabled via *_ENABLED variables.

3. Create database tables

Execute the following SQL to create the required tables (SSO sessions, users, posts, etc.):

4. Implement user authentication interface

The SSO module requires you to provide real user verification logic. Create a class that implements PhpTools\SSO\AuthenticatorInterface, for example:

Then pass an instance of it to SSO::fromEnv() in your entry file index.php.

5. Configure web server

Point your website root to public/ (if you use public/index.php) or directly to the project root's index.php. It is recommended to use public/ as the public directory for better security.

6. Access the application

Visit your domain. If everything is configured correctly, you will see the default API response (or routes you defined).

Directory Structure

Module Overview

SSO (Single Sign-On)

Community

All sub-modules extend CommunityBase and use SSO for authentication. Sub-module switches are controlled by COMMUNITY_*_ENABLED.

Sub-module Main Features
User User profile query and update
Acl Role-based permission checking
Content Post creation, listing, deletion (with permission checks)
File File upload, download, deletion (with type and size restrictions)
Notification Send, query, mark-as-read for internal notifications
Cache File cache implementation (supports TTL)
Log Simple file logger
Captcha Math or text CAPTCHA generation

API Gateway

Configuration Reference (.env)

Variable Description Default
APP_DEBUG Debug mode, shows detailed errors false
SSO_ENABLED Enable SSO module true
COMMUNITY_ENABLED Enable Community module true
API_ENABLED Enable API module true
SSO_TOKEN_EXPIRE Token expiration (seconds) 3600
SSO_AUTHCODE_EXPIRE AuthCode expiration (seconds) 3600
SSO_IPV6_PREFIX IPv6 prefix length to compare 64
DB_HOST / DB_PORT etc. Database connection parameters localhost
API_RATE_LIMIT_REQUESTS Max requests per window 100
API_RATE_LIMIT_WINDOW Rate limit window (seconds) 60
API_RATE_LIMIT_DRIVER Rate limit driver (memory/redis) memory

See .env.example for more configuration items

Usage Examples

1. Enable SSO Login

2. Create a Post (Community Content)

3. Register API Routes

Extending

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Contact

For questions or suggestions, please open an issue or pull request.


All versions of php-tools with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
vlucas/phpdotenv Version ^5.4
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 tiao2/php-tools contains the following files

Loading the files please wait ...