Download the PHP package techdivision/lang without Composer

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

TechDivision_Lang

Latest Stable Version Total Downloads Latest Unstable Version License Build StatusScrutinizer Code QualityCode Coverage

Introduction

This package provides implementation of basic PHP datatypes.

Installation

If you want to use the library with your application you can install it by adding

to your composer.json and invoke composer update in your project.

Usage

This package provides classes representing an object oriented implementation for some basic datatypes.

As there has been (and still are) many discussions about PHP and type safety i decided to implement a small, really basic library that will offer the most basic datatype needed in nearly every project. To be honest, i really like almost allof those nice possibilities languages like Java provides, but as PHP is not Java, you always have to find a neat way for implementing similar things in a way it makes sense in a PHP environment.

The intention for implementing that classes was the possiblity to make your critical functions and methods type safe, by using them for type hints on the one hand and the possiblity to have an quick and easy to use kind of data validation mechanism on the other.

As you may know, using type hints will probably slow down your code a bit, so take care when you use them and always have an eye on possible performance impacts by running performance tests regularily.

The data type implementations this library will provide, are

The following examples wil give you a short introduction about the functionality each class will provide and how you can use it in your code. Please be aware, that the examples are not intended to make any sense, they should only give you an idea what is possible.

Object

The abstract class Object implements a low level presentation of a class. All other classes of this library use it as superclass.

Boolean

Using a Boolean instance to compare against anonther one or try to instanciate it with a not boolean value.

Integer

Here are some examples how you can use the Integer class

Float

The example for using a Float shows you how to add to instances and print the float value

String

To show you how you can use the String class we'll simple concatenate to instances

Yeah, this are really simple examples, and as i told you before in most cases i'll use that classes for simple things like type hints and so on.

If you like to use that stuff also, feel free to implement your own types and send me a pull request :)

External Links


All versions of lang with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
herrera-io/annotations Version 1.0.*
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 techdivision/lang contains the following files

Loading the files please wait ....