jul/lib

A set of frequently used PHP classes.

dev-master 2015-02-04 21:10 UTC

This package is not auto-updated.

Last update: 2024-05-11 14:23:35 UTC


README

####A set of frequently used PHP classes.
Most links point to interfaces for clarity, but abstract classes and concrete implementations can be found in the same folder where relevant.
All tests are located in the Tests folder.

Collection

  • Buffer
    A fixed size, iterable F.I.F.O object buffer.
  • Collection
    An iterable set of objects, complete with filter, sort, etc.

Entity

  • Entity
    Definition of a persistent object.
  • Handler
    Set of operations handling the persistence and retrieval of entities.

Math

  • Function
    An object-oriented container for mathematical functions. The goal of this architecture is to build function stacks.
    • Closure function A user-defined function is used to calculate the function output.
    • Log Natural logarithm and log(base).
    • Softmax The categorical probability distribution of a vector. The softmax function is often implemented at the final layer of an artificial neural network used for classification.
  • Vector
    Perform common arithmetic operations on a vector of floats. For instance, the cosine similarity of two vectors is commonly used in text mining and classification tasks.

String

  • Filter
    A filter transforms a string. This object-oriented approach allows to build filter stacks.
    • Lowercase Convert all alphabetical characters to lowercase.
    • Uppercase Convert all alphabetical characters to uppercase.
    • Whitespace Trim consecutive whitespaces down to a single whitespace. New lines and tabs are also converted to a single whitespace.
  • Property
    A property quantifies a particular aspect of a string. Useful to create vector representations, such as word vectors.
    • Closure property A user-defined function is used to calculate the property value.
    • Shannon entropy Estimate the average minimum number of bits needed to encode a string. One of the many aspects to consider to create strong passwords, or measure randomness in a string.
  • Tokenizer
    Break a string down into an array of terms.
    • Delimiter Similar to PHP's native explode() function, with additional checks.
    • Repeated substring Find all repeated substrings in a string. Used in full text indices, data compression, semantic analysis, spam filtering, and within the field of bioinformatics.
    • Suffix array A sorted array of all suffixes of a string. An efficient alternative to a suffix tree.

Sys

  • PhpInfo
    Wrapper for the classic phpinfo() function.