Download the PHP package fccn/webapp-tools-common without Composer

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

Webapp tools - Common tools collection

This collection provides common utilities for the webapp skeleton project, such as site configuration singleton loader a singleton file logger and a collection of utility functions for generating content.

Installation

You can install this collection in your project using composer

Collection components

The following components are part of this collection.

Site configuration loader

This is a singleton class that provides a centralized location for the application configuration. The configuration is loaded from a single PHP file, containing an array with all configuration options. It is also possible to use multiple configuration files as long as the main configuration file that is loaded by the configuration loader requires the remaining configuration files.

Configuration

The path to the configuration file can be defined in the CONFIG_FILE variable. Just add in your code define("CONFIG_FILE", <path-to-your-config>); before loading this collection. If the path to the configuration file is not set it defaults to config.php on the root folder.

An example of the possible content of the configuration file is shown below:

The configuration file needs to follow a set of directives in order for it to be correctly loaded in the configuration loader:

A sample of a configuration file can be found in samples/config_sample.php. The

Usage

To access the configuration loader use \Fccn\Lib\SiteConfig::getInstance(). To get the configuration value use the get() method, for example, to get the value for logfile_path use \Fccn\Lib\SiteConfig::getInstance()->get('logfile_path').

You can also add new configurations or replace a configuration on demand by using the set() method \Fccn\Lib\SiteConfig::getInstance()->set('key','value'). However, these values are not permanently stored in the configuration file.

File logger

The file logger is a configurable wrapper for Monolog. It provides a singleton class for writing debug, notice, info, warn and error messages. It uses the configuration loader to load the settings for the path to the logfile and the log level.

Configuration

The following key-value pairs need to be added to the application configuration file $c array:

Usage

To write a log line you can use the error(), warn(), info(), notice() and debug() methods. For example to write a warning log line use \Fccn\Lib\FileLogger::warn('some warning').

To get the singleton instance of the file logger use \Fccn\Lib\FileLogger::getInstance()

Web application utilities

This presents a collection of utilities that are used by the webapp skeleton project. At this moment the following functions are available:

Configuration

No configuration is required to use the web application utilities

Usage

Testing

This project uses codeception for testing. To run the tests call composer test on the root of the project folder.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details


All versions of webapp-tools-common with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
monolog/monolog Version ^1.17
ircmaxell/random-lib Version ^1.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 fccn/webapp-tools-common contains the following files

Loading the files please wait ....