Skip to content

Latest commit

 

History

History
278 lines (192 loc) · 9.06 KB

README.md

File metadata and controls

278 lines (192 loc) · 9.06 KB

Awesome PHP value objects

Awesome list of various PHP value objects.

Table of contents

  • cultuurnet/valueobjects
  • Antnee/PHP-Value-Objects
  • bruli/php-value-objects
  • danitome24/php-valueobject
  • tanigami/value-objects-php
  • g4code/value-object
  • biberlabs/ddd-embeddables
  • dave-redfern/somnambulist-value-objects
  • Aerendir/PHPValueObjects
  • gws/php-valueobjects
  • apioo/psx-uri
  • vasildakov/postcode
  • randock/value-object
  • funeralzone/valueobjects
  • smartemailing/types
  • nepada/email-address
  • wmde/email-address
  • wmde/Euro
  • Crell/HtmlModel
  • spatie/data-transfer-object
  • Litipk/php-bignumbers
  • php-collective/decimal-object

Repositories

cultuurnet/valueobjects PHP 5.5

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

Category Value Objects
Data Structure Enum, Collection, Dictionary, KeyValuePair
Climate Temperature, Celcius, Fahrenheit, Kelvin, RelativeHumidity
DateTime Date, DateTime, DateTimeWithTimeZone, Hour, Minute, Month, MonthDay, Second, Time, TimeZone, WeekDay, Year
Geography Address, Continent, Coordinate, Country, CountryCode, CountryCodeName, DistanceFormula, DistanceUnit, Ellipsoid, Latitude, Longitude, Street
Identity MacAddress, UUID
Money Currency, CurrencyCode, Money
Person Age, Gender, Name
Scalar BooleanLiteral, BooleanString, Complex, Integer, Natural, Real, RoundingMode, NullValue, StringLiteral
Web Domain, EmailAddress, FragmentIdentifier, Hostname, IPAddress, IPAddressVersion, IPv4Address, IPv6Address, NullFragmentIdentifier, NullPortNumber, NullQueryString, Path, PortNumber, QueryString, SchemeName, Url

Antnee/PHP-Value-Objects PHP 5.5

Category Value Objects
Web EmailAddress
Person PhoneNumber
User Id, Password

bruli/php-value-objects PHP 5.6

Category Value Objects
Geography CountryCode, LanguageCode, Latitude, Locale, Longitude
Identity Md5ValueObject, Sha1ValueObject, Sha256ValueObject, Uuid
Money Currency
Scalar BooleanValueObject, FloatValueObject, IntegerValueObject, NaturalNumber, StringLiteral
Spatial MultiPolygonValueObject, PolygonValueObject
Web Email, Ipv4, Ipv6, TcpPort, Url

danitome24/php-valueobject PHP 7.1

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

Category Value Objects
Geography Address, Latitude, Longitude, PostalCode
Identifier Uuid
Person Age, Female, Gender, Grams, Height, Kilograms, Male, Name, Neutral, Pounds, Weight
Phone CellPhone, LandlinePhone, Phone
User Email, Password, Username

tanigami/value-objects-php PHP 7.0

Yet another collection of Value Object implementation in PHP.

Category Value Objects
Geography Country, Latitude, Longitude, Japan: Region, Prefecture, PrefectureSuffix
Money Currency, Money
DateTime Date, TimeLength, TimeOfDay, TimeRange, TimeRangeOfDay
Web Email, EmailAddress, EmailAttachment, HttpMethod, IpAddressV4, IpAddressV6, Url

g4code/value-object

Category Value Objects
Data Sructure ArrayList, Dictionary
DateTime TimestampValue
Development AssetsUrl, Environment, SemanticVersioning
E-commerce Vat
Identity Base64Encoded, Md5, Sha1, Uuid
Geography Coordinate, CountryCode, LanguageCode
Money Currency,
Person Birthday, Gender
Scalar BooleanValue, IntegerNumber, StringLiteral
Web Device, 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.

Category Value Objects
Color Color
DateTime DateRange
Geography GeoPoint
Person Fullname
Web EmailAddress, 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.

Category Value Objects
Auth PublicPrivateKey
DateTime DateTime, TimeZone
Geography Coordinate, Country, CountryCode, CountryCodeMappings, Srid
Identity Aggregate, EmailAddress, Uuid
Measure Area, AreaUnit, Distance, DistanceUnit
Money Currency, CurrencyCode, CurrencyCodeMappings, Money
Person PhoneNumber
Web IPv4Address, IPv6Address, IpAddress, Url

Aerendir/PHPValueObjects PHP 5.6

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

Category Value Objects
Address Address
Money CurrencyExchangeRate, Money
Person Phone
E-commerce Payment, Tax, VatNumber, VatRate
Web Email, Ip, Uri

gws/php-valueobjects PHP 5.4

PHP value objects (PoEAA)

Category Value Objects
DateTime DateRange, DateTimeRange
Money Money
Web Ip, Mac

apioo/psx-uri PHP 7.0

URI, URL and URN immutable value objects

Category Value Objects
Web Uri, Url, Urn

vasildakov/postcode PHP 5.4

Value Object that represents an UK postcode

Category Value Objects
Geography Postcode

randock/value-object PHP 7.1

Value Objects

Category Value Objects
Geography Country, Nationality
Money Currency, ExchangeRate, Money
Person Phone

funeralzone/valueobjects PHP 7.1

This library only deals with fundamental values (scalars)

Category Value Objects
Scalar Nullable, Set, NonNullSet, NullableSet

smartemailing/types PHP 7.1

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

Category Value Objects
Address Address
Company CompanyRegistrationNumber
DateTime DateTimeRange, Duration, TimeUnit
Enums LawfulBasisForProcessing, CurrencyCode, FieldOfApplication, TimeUnit, Relation
Identity Guid, Iban
Geography CountryCode, ZipCode
Money CurrencyCode, Price, SwiftBic, VatId
Person PhineNumber, FieldOfApplication
Scalar JsonString, Hex32, Base64String, Quantity, Part, ReLUValue, SigmoidValue, UniqueIntArray, UniqueStringArray
Web Domain, Emailaddress, IpAddress, UrlType, Port, LoginCredentials

nepada/email-address PHP 7.1

Email address value object.

Category Value Objects
Web EmailAddress

wmde/email-address PHP 7.0

Email Address value object written in PHP 7.

Category Value Objects
Web EmailAddress

wmde/Euro PHP 7.1

Value Object that represents a positive amount of Euro.

Category Value Objects
Money Euro

Crell/HtmlModel PHP 7.1

Domain value objects for modeling HTML pages.

Category Value Objects
Development AttributeBag, 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.

Category Value Objects
Development DataTransferObject, DataTransferObjectCollection

Litipk/php-bignumbers PHP 7.0

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

Category Value Objects
Scalar Decimal

php-collective/decimal-object PHP 8.1

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

Category Value Objects
Scalar Decimal