Skip to content
/ Collection Public

Collection management, heavily inspired by Doctrine ArrayCollection

License

Notifications You must be signed in to change notification settings

Amo/Collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collection

Collection management, heavily inspired by Doctrine ArrayCollection

Install

composer require amo/collection

Usages

// Static instantiation
Collection::make($repository->findBy($criterias))
    // map method, allows to create a new collection 
    // based on each item of the given collection 
    ->map(function(User $user){
        return $user->getEmail();
    })
    // each method, executes a closure fore each item of a collection
    ->each(function(String $email) {
        $message = $this->buildMessage($email);
        $this->mailer->send($message);
    });
    // etc...

About

Collection management, heavily inspired by Doctrine ArrayCollection

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages