Download the PHP package tarsana/functional without Composer

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

Tarsana Functional

Build Status Coverage Status Scrutinizer Code Quality Donate Software License

Functional programming library for PHP.

Table of Contents

Introduction

What is that ?

This is a Functional Programming library for PHP.

Why Functional Programming ? Isn't Object Oriented good enough ?

Well, it dependes on your needs. FP and OOP are very different. Personally I like FP because the code is easier to write, test and maintain; even if it runs generally slower than the equivalent procedural or OOP code.

Just Googled and found many FP libraries for PHP. Why are you writing a new one ?

This library is inspired by Ramda which is a FP library for Javascript. Ramda was created after underscore and lodash and it has a better Functional API then others. This talk explains how. So I wanted a library with the same philisophy as Ramda supporting old versions of PHP (from version 5.4).

Get Started

You can install this library using composer

Then you can use it by importing the Tarsana\Functional namespace.

Features

The main features of this library are:

Functions

Functions are grouped into modules

Classes

Why classes ? Isn't that a FUNCTIONAL library ?

We can use classes to define Types and Containers as long as they are immutable and have pure methods. Defining a container as a class gives us a fluent API and elegant code.

The main class defined in this library is Stream. It's an immutable data container with lazy evaluation and type errors detection. It will allow you to write code like the following:

Then if the file temp.txt contains:

The code above will output:

Click here to learn more about Stream

There is also the Tarsana\Functional\Error class which is just extending the default Exception class and providing a static method Error::of('msg') to create new errors without using the new operator.

Tests

All tests are under the tests directory. they can be run using phpunit.

Contributing

Please consider reading the Contribution Guide, it will help you to understand how is the project structured and why I am including a build.php and package.json files !

Changes Log

Version 2.2.2

Version 2.2.1

Version 2.2.0

Version 2.1.0

Version 2.0.0

Version 1.1.0

Version 1.0.0


All versions of functional with dependencies

PHP Build Version
Package Version
No informations.
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 tarsana/functional contains the following files

Loading the files please wait ....