Home

Awesome

Awesome PHP value objects

Awesome list of various PHP value objects.

Table of contents

Repositories

cultuurnet/valueobjects PHP 5.5

This is a fork of the nicolopignatelli/valueobjects library which was removed from GitHub. Not maintained.

CategoryValue Objects
Data StructureEnum, Collection, Dictionary, KeyValuePair
ClimateTemperature, Celcius, Fahrenheit, Kelvin, RelativeHumidity
DateTimeDate, DateTime, DateTimeWithTimeZone, Hour, Minute, Month, MonthDay, Second, Time, TimeZone, WeekDay, Year
GeographyAddress, Continent, Coordinate, Country, CountryCode, CountryCodeName, DistanceFormula, DistanceUnit, Ellipsoid, Latitude, Longitude, Street
IdentityMacAddress, UUID
MoneyCurrency, CurrencyCode, Money
PersonAge, Gender, Name
ScalarBooleanLiteral, BooleanString, Complex, Integer, Natural, Real, RoundingMode, NullValue, StringLiteral
WebDomain, EmailAddress, FragmentIdentifier, Hostname, IPAddress, IPAddressVersion, IPv4Address, IPv6Address, NullFragmentIdentifier, NullPortNumber, NullQueryString, Path, PortNumber, QueryString, SchemeName, Url

Antnee/PHP-Value-Objects PHP 5.5

CategoryValue Objects
WebEmailAddress
PersonPhoneNumber
UserId, Password

bruli/php-value-objects PHP 5.6

CategoryValue Objects
GeographyCountryCode, LanguageCode, Latitude, Locale, Longitude
IdentityMd5ValueObject, Sha1ValueObject, Sha256ValueObject, Uuid
MoneyCurrency
ScalarBooleanValueObject, FloatValueObject, IntegerValueObject, NaturalNumber, StringLiteral
SpatialMultiPolygonValueObject, PolygonValueObject
WebEmail, Ipv4, Ipv6, TcpPort, Url

danitome24/php-valueobject PHP 7.1

Simple project with some Value objects that author use on his personal projects.

CategoryValue Objects
GeographyAddress, Latitude, Longitude, PostalCode
IdentifierUuid
PersonAge, Female, Gender, Grams, Height, Kilograms, Male, Name, Neutral, Pounds, Weight
PhoneCellPhone, LandlinePhone, Phone
UserEmail, Password, Username

tanigami/value-objects-php PHP 7.0

Yet another collection of Value Object implementation in PHP.

CategoryValue Objects
GeographyCountry, Latitude, Longitude, Japan: Region, Prefecture, PrefectureSuffix
MoneyCurrency, Money
DateTimeDate, TimeLength, TimeOfDay, TimeRange, TimeRangeOfDay
WebEmail, EmailAddress, EmailAttachment, HttpMethod, IpAddressV4, IpAddressV6, Url

g4code/value-object

CategoryValue Objects
Data SructureArrayList, Dictionary
DateTimeTimestampValue
DevelopmentAssetsUrl, Environment, SemanticVersioning
E-commerceVat
IdentityBase64Encoded, Md5, Sha1, Uuid
GeographyCoordinate, CountryCode, LanguageCode
MoneyCurrency,
PersonBirthday, Gender
ScalarBooleanValue, IntegerNumber, StringLiteral
WebDevice, DomainName, Email, EmailType, GACode, HttpMethod, Ip, Location, Pathname, PortNumber, RealPath, RelativePath, Url

biberlabs/ddd-embeddables PHP 5.6

A collection of reusable value objects written in PHP and targeting versions 5.6 and above.

CategoryValue Objects
ColorColor
DateTimeDateRange
GeographyGeoPoint
PersonFullname
WebEmailAddress, IpAddress, IpRange

dave-redfern/somnambulist-value-objects PHP 7.0

This library provides an abstract base class that provides a basic equality test and foundation for your VOs along with a couple of basic types.

CategoryValue Objects
AuthPublicPrivateKey
DateTimeDateTime, TimeZone
GeographyCoordinate, Country, CountryCode, CountryCodeMappings, Srid
IdentityAggregate, EmailAddress, Uuid
MeasureArea, AreaUnit, Distance, DistanceUnit
MoneyCurrency, CurrencyCode, CurrencyCodeMappings, Money
PersonPhoneNumber
WebIPv4Address, IPv6Address, IpAddress, Url

Aerendir/PHPValueObjects PHP 5.6

A set of PHP Value Objects to manage simple and composite values.

CategoryValue Objects
AddressAddress
MoneyCurrencyExchangeRate, Money
PersonPhone
E-commercePayment, Tax, VatNumber, VatRate
WebEmail, Ip, Uri

gws/php-valueobjects PHP 5.4

PHP value objects (PoEAA)

CategoryValue Objects
DateTimeDateRange, DateTimeRange
MoneyMoney
WebIp, Mac

apioo/psx-uri PHP 7.0

URI, URL and URN immutable value objects

CategoryValue Objects
WebUri, Url, Urn

vasildakov/postcode PHP 5.4

Value Object that represents an UK postcode

CategoryValue Objects
GeographyPostcode

randock/value-object PHP 7.1

Value Objects

CategoryValue Objects
GeographyCountry, Nationality
MoneyCurrency, ExchangeRate, Money
PersonPhone

funeralzone/valueobjects PHP 7.1

This library only deals with fundamental values (scalars)

CategoryValue Objects
ScalarNullable, Set, NonNullSet, NullableSet

smartemailing/types PHP 7.1

Missing data types for PHP 7.1. Highly extendable, production tested.

CategoryValue Objects
AddressAddress
CompanyCompanyRegistrationNumber
DateTimeDateTimeRange, Duration, TimeUnit
EnumsLawfulBasisForProcessing, CurrencyCode, FieldOfApplication, TimeUnit, Relation
IdentityGuid, Iban
GeographyCountryCode, ZipCode
MoneyCurrencyCode, Price, SwiftBic, VatId
PersonPhineNumber, FieldOfApplication
ScalarJsonString, Hex32, Base64String, Quantity, Part, ReLUValue, SigmoidValue, UniqueIntArray, UniqueStringArray
WebDomain, Emailaddress, IpAddress, UrlType, Port, LoginCredentials

nepada/email-address PHP 7.1

Email address value object.

CategoryValue Objects
WebEmailAddress

wmde/email-address PHP 7.0

Email Address value object written in PHP 7.

CategoryValue Objects
WebEmailAddress

wmde/Euro PHP 7.1

Value Object that represents a positive amount of Euro.

CategoryValue Objects
MoneyEuro

Crell/HtmlModel PHP 7.1

Domain value objects for modeling HTML pages.

CategoryValue Objects
DevelopmentAttributeBag, BaseElement, HeadElement, HtmlFragment, HtmlPage, KeywordsMetaElement, LinkElement, MetaCharsetElement, MetaElement, MetaRefreshElement, NamedMetaElement, ScriptElement, StyleElement, StyleLinkElement

spatie/data-transfer-object PHP 7.1

Data transfer objects with batteries included.

CategoryValue Objects
DevelopmentDataTransferObject, DataTransferObjectCollection

Litipk/php-bignumbers PHP 7.0

A robust library to handle immutable big numbers inside PHP applications.

CategoryValue Objects
ScalarDecimal

php-collective/decimal-object PHP 8.1

A robust decimal value object to handle e.g. monitary values with high precision.

CategoryValue Objects
ScalarDecimal