Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Josh edited this page Apr 23, 2018 · 18 revisions

Several classes can be found within the \blobfolio\common namespace. Each class represents a (hopefully) logical grouping by functionality. Some functions are available in both by-value and by-reference versions. In such cases, the namespace \blobfolio\common\ref is used instead.

\blobfolio\common\cli

This class contains a few helpers for scripts running in a CLI context.

\blobfolio\common\constants

To improve performance at scale, data like templates, lists, settings, etc., are hardcoded as public constants under this class. These properties can be accessed independently if desired, but for the most part are intended for internal use by the various blob-common functions.

\blobfolio\common\dom

This class contains DOM-traversal helpers. This is largely focused around making certain \DOMDocument and \DOMXPath tasks easier, but some functionality is independent of those extensions.

\blobfolio\common\file
\blobfolio\common\ref\file

This class contains functions to help with filesystem tasks and path manipulation.

\blobfolio\common\format
\blobfolio\common\ref\format

This class contains functions to help (re)format data.

\blobfolio\common\data

This class contains miscellaneous functionality, mostly related to data manipulation.

\blobfolio\common\image

This class contains various SVG and WebP helpers.

MIME Types and File Extensions

\blobfolio\common\mime

This class is an alias for \blobfolio\mimes\mimes. For more information, refer to the blob-mimes project.

\blobfolio\common\mb
\blobfolio\common\ref\mb

This class contains various multi-byte versions of native PHP functions. This is largely focused on extending and improving functionality provided by the mbstring extension.

\blobfolio\common\sanitize
\blobfolio\common\ref\sanitize

This class contains functionality for validating and sanitizing various types of data such as email addresses, credit card numbers, phone numbers, etc.

\blobfolio\common\cast
\blobfolio\common\ref\cast

This class contains robust type-conversion functionality. These methods are less performant than native operations like $foo = (int) $foo, but are more intelligent and less likely to explode when passed wacky values.

CLI

Constants

Dom Helpers

Files and Paths

Formatting

General Data Helpers

Images

Multi-Byte Wrappers

Sanitizing and Validation

Typecasting

Clone this wiki locally