Download the PHP package nadirlc/utilities-framework without Composer

On this page you can find all versions of the php package nadirlc/utilities-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 utilities-framework

Utilities Framework

Introduction

The Utilities Framework is a set of Php libraries that provide functions such as error handling, logding, emailing, fetching web pages, script profiling, database abstraction, encryption, template engine and more. It requires Php 7.2 and above. The libraries are easy to use and can be used with custom applications and Php Frameworks

The Utilities Framework code is fully commented and compliant with the PSR-2 coding guidelines.

Features

The Utilities Framework has the following features:

  1. Database Management

    It provides functions for working with Databases. It consists of a Query Builder, Database Cache Manager and Database Log Manager. It also provides a Database MetaQuery Runner and Database Transaction Manager, based on PDO

  2. Method Validation

    This allows validating method parameter values against information in the method's Doc Block comments. This feature is provided by the Comment Manager package.

  3. Error Management

    It allows application errors to be displayed using html template files. The template files can be easily customized. Default template files are provided for displaying formatted error messages for the browser and the command line

  4. File and Folder Management

    It provides functions for fetching url contents, checking if network connection works, searching for files with a folder and copying folder contents recursively

  5. Email Handling

    It provides functions for sending email in plain text format and html format with file attachments. It is based on the Pear Mail library and hence supports sending email using SMTP server, Php mail function and Sendmail library

  6. Log Management

    It provides functions for saving and updating log data to database. It uses the PDO library for saving data and hence allows log data to be saved to all the databases that are supported by PDO

  7. Template Engine

    It provides a template engine that allows separating the html layout code from the data. It also allows templates to be built recursively. This means that a template can consist of one or more templates, which can contain more templates. This allows complex website layouts to be divided in to simple layout files that are automatically combined by the template engine

  8. Encryption

    It provides function for encrypting and decrypting data using the new LibSodium library, which is part of Php >=7.2

  9. String Utilities

    It provides functions for exporting data to RSS format, converting relative urls to absolute, checking if string is valid JSON, HTML or Base64 encoded and more

  10. Profiler

    It allows the memory usage and execution time to be measured between function calls

  11. Cache Manager

    It allows data to be stored in a cache. It supports memory cache and database cache

  12. Authentication

    It provides functions for authenticating users using http digest authentication

The following screenshot shows the error message displayed by the error handler component:

Error Handler Component

The following screenshot shows the MySQL query log displayed by the error handler component as part of the error:

MySQL Query Log

Installation

  1. Install using composer:

    Run the command: composer require nadirlc/utilities-framework

    OR

  2. Download from the Utilities Framework GitHub Repository

    Run the command: git clone https://github.com/nadirlc/utilities-framework.git

Usage

All components of the Utilities Framework can be accessed using factory functions. To use a feature, we need to first create an object of the relavant component. For example: UtilitiesFramework::Factory("email", $parameters);. To send an email the following code can be used:


/* The Email class requires Mail and Mail_Mime pear package */
include_once ("Mail.php");
include_once ("Mail/mime.php");

/* Change the from and to emails to your email address */
$from_email       = "[email protected]";
$to_email         = "[email protected]";
/** The parameters for the email object */
$parameters       = array("params" => "", "backend" => "mail");
/* The Email class object is fetched */
$email            = UtilitiesFramework::Factory("email", $parameters);
/** The email is sent */
$is_sent          = $email->SendEmail($from_email, $to_email, "Utilitiesframework Test",
                        "<h3>test html content</h3>", 
                        null,
                        array("file-path")
                    );
/** If the email was sent, then information message is shown */
if ($is_sent) echo "Email was successfully sent";
else echo "Email could not be sent";

Examples

The /examples folder contains example usage for each component


All versions of utilities-framework with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
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 nadirlc/utilities-framework contains the following files

Loading the files please wait ....