Coder Social home page Coder Social logo

php_nml's Introduction

Scrutinizer Code Quality Code Coverage Build Status

API Docs

PHP: Nelson Martell Library

Description

Provides a set of classes for PHP applications.

Note: This is an unstable repository in development and should be treated as an alpha.

Requirements

  • PHP 5.5 or greater
  • CakePHP Utility Classes 3.0.5 or grater - Only needed Cake\Utility\Text class, that should be loaded. There is a copy of that class into vendor directory to be auto-used if CakePHP Utility Classes is not available.

Installation

As Git submodule

In your vendor directory, type:

git submodule add https://github.com/nelson6e65/php_nml.git
git submodule init
git submodule update

Or you can also clone using ssh auth:

git submodule add [email protected]:nelson6e65/php_nml.git
git submodule init
git submodule update

This installs NML into your Vendor directory as php_nml.

Manually

  • Download NML from releases, master-tar.gz or master-zip.
  • Unzip that download.
  • Rename the resulting folder to php_nml.
  • Then copy/move this folder into your vendor directory

Usage

This library implements an auto-load system even for non-composer installs.

First you should import autoload.php file from php_nml root directory into your app configuration file:

<?php
    //app/config.php
    //Other configs of your application...
    require_once('path/to/your/app/Vendor/php_nml/autoload.php');
    //...

Then, the library classes will be available to use:

<?php
//Example of use of Version class:
use NelsonMartell\Version;

$nmlVersion = new Version(0, 3);

echo $nmlVersion.ToString();

Note: If you dont' use CakePHP Utility Classes, there is a minimal copy of needed class in php_nml/vendor/Cake/Utility directory. This autoload.php includes php_nml/vendor/autoload.php file to autoloads psr-4 classes from that vendor.

For more details about available classes from NML, you can check the API Documentation.

Code Analysis

You can, optionally, define the CODE_ANALYSIS constant if you like some notices and warnings to be throws while you are coding/debugging. This is useful to watch some recommendations about usage of some clases, functions, methods, etc.

<?php
    //Other configs of your application
    //..
	define('CODE_ANALYSIS', true);
	//...

php_nml's People

Contributors

joeladmin avatar nelson6e65 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.