Download the PHP package darling/php-text-types without Composer
On this page you can find all versions of the php package darling/php-text-types. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download darling/php-text-types
More information about darling/php-text-types
Files in darling/php-text-types
Package php-text-types
Short Description A collection of classes that represent various types of text.
License MIT
Informations about the package php-text-types
PHPTextTypes
A collection of classes that represent various types of text.
-
Installation
-
Classes
- Darling\PHPTextTypes\classes\strings\Text
- Darling\PHPTextTypes\classes\strings\ClassString
- Darling\PHPTextTypes\classes\strings\UnknownClass
- Darling\PHPTextTypes\classes\strings\SafeText
- Darling\PHPTextTypes\classes\strings\AlphanumericText
- Darling\PHPTextTypes\classes\strings\Name
- Darling\PHPTextTypes\classes\strings\Id
Installation
Classes
The following is an overview of the classes provided by the
PHPTextTypes
library.
These classes can be used as is, or extended to define new types of text.
Darling\PHPTextTypes\classes\strings\Text
Text represents a string, can be cast to the string it represents, and can provide information about the string it represents.
Note: The Darling\PHPTextTypes\classes\strings\Text class is the parent of all other classes defined by this library.
Example:
https://github.com/sevidmusic/PHPTextTypes/blob/main/TextExample.php
Darling\PHPTextTypes\classes\strings\ClassString
A ClassString is the name of an existing Class prefixed by it's namespace.
Example:
Darling\PHPTextTypes\classes\strings\UnknownClass
An UnknownClass is a ClassString that represents an unknown class.
Example:
Darling\PHPTextTypes\classes\strings\SafeText
SafeText is used to provide a safe form of Text that may contain unsafe characters.
The following characters are considered safe:
- Alphanumeric characters: A-Z, a-z, and 0-9
- Underscores: _
- Hyphens: -
- Periods: .
Unsafe characters in the original Text will be replaced with underscores.
A consecutive sequence of 2 or more unsafe characters will be replaced by a single underscore.
A consecutive sequence of 2 or more underscores will be replaced by a single underscore.
A consecutive sequence of 2 or more hyphens will be replaced by a single hyphen.
A consecutive sequence of 2 or more periods will be replaced by a single period.
SafeText will never be empty, if the original Text is empty, then the SafeText will be the numeric character 0.
Example:
Darling\PHPTextTypes\classes\strings\AlphanumericText
AlphanumericText is SafeText that only contains alphanumeric characters.
Example:
Darling\PHPTextTypes\classes\strings\Name
A Name is SafeText that begins with an alphanumeric character, is at least 1 character in length, is no more than 70 characters in length, and only contains the following characters:
- Alphanumeric characters: A-Z, a-z, and 0-9
- Underscores: _
- Hyphens: -
- Periods: .
Example:
Darling\PHPTextTypes\classes\strings\Id
An Id is AlphanumericText whose length is between 60 and 80 characters.
Example:
All versions of php-text-types with dependencies
darling/php-unit-test-utilities Version ^1.0
darling/php-darling-dev-tools Version ^1.0