Tagged: Phabstractic

0

Phabstractic: Enumeration Data Type

PHP doesn’t have an enumeration data type, so I built an enumeration generator of my own. It actually won an award on phpclasses.org! It has been refactored to use the Configuration feature, formatted to follow the PSR standards as best it can, and relicensed under the MIT License.

0

Phabstractic: Configuration Trait Feature

The thing about PHP and the mixin’s I’ve developed is that they are not necessarily a class, instead the idea is that they are a trait that offers a particular feature to another class. So you define a feature, something the class can do, such as logging, or being able to hold configurations (see below) and then you can add it to a particular class.

0

Phabstractic: Range Data Type

Predicate objects are an interesting concept, which could have many uses in functional programming, in mathematical polymorphism, in input validation, etc. Ranges are a specific version of a predicate object that tests if any given value is within the maximum and minimum range defined in the object.

1

Phabstractic: Singleton Trait Design Pattern

In software engineering, the singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.

0

Phabstractic: None Data Type

But what happens when you want to differentiate between false, 0, and null? Or in another context, what if you need a null value that is considered an object by the algorithm or language?