Download the PHP package tobento/service-user without Composer
On this page you can find all versions of the php package tobento/service-user. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package service-user
User Service
A user and address interface for PHP applications.
Table of Contents
- Getting started
- Requirements
- Highlights
- Documentation
- User
- Create User
- User Factory
- User Interface
- Address
- Create Address
- Address Factory
- Address Interface
- Addresses
- Create Addresses
- Addresses Factory
- Addresses Interface
- Addressable
- Address Aware Interface
- User Aware Interface
- User
- Credits
Getting started
Add the latest version of the user service project running this command.
Requirements
- PHP 8.4 or greater
Highlights
- Framework-agnostic, will work with any project
- Decoupled design
Documentation
User
Create User
Check out the User Interface to learn more about the interface.
Check out Addressable to learn more about the interface.
User Factory
Easily create a user with the provided user factory:
createUser
Parameters:
createUserFromArray
If you want to create a user with addresses, you need to set an AddressesFactory, otherwise addresses gets not created.
User Interface
Address
Create Address
Address Factory
Easily create an address with the provided address factory:
createAddress
Parameters:
createAddressFromArray
Address Interface
getters
with methods
The with methods will return a new instance.
Addresses
Create Addresses
Check out Addresses Interface to learn more about the interface.
Addresses Factory
Easily create an addresses object with the provided addresses factory:
createAddresses
createAddressesFromArray
Addresses Interface
addressFactory
get
The get method returns the address by the specified key. If the address does not exist yet, it will create and add it to the addresses.
add
create
The create method creates an address with the specified parameters, but does it not add to the addresses.
address
The address method creates an address and adds it to the addresses.
has
Check if an address exists.
delete
all
filter
You might filter addresses returning a new instance.
group
The group method filters addresses by the specified group.
Addressable
addresses
Check out the Addresses Interface to learn more about the interface.
address
The address method returns the address if exists or creates a new address for the specified key.
hasAddress
Address Aware Interface
The user has implemented the interface returning the address:
User Aware Interface
Credits
- Tobias Strub
- All Contributors
All versions of service-user with dependencies
tobento/service-collection Version ^2.0
tobento/service-support Version ^2.0