Skip to content
This repository has been archived by the owner on Aug 28, 2018. It is now read-only.

An abstract class which provides provides an collection which only can only contain objects of a single class

License

Notifications You must be signed in to change notification settings

pietdevries94/single-class-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single Class Collection

An abstract class which provides provides an collection which only can only contain objects of a single class.

Ther reason for this package is if you want to make a collection with specific methods for a class, you can be sure that the class solely contains that specific class.

Usage

Extend the abstract class in this package and overwrite the protected property $collectionClass with the fully qualified class name. The best way to do this is by using ::class.

Example

class IssueCollection extends \Pietdevries94\SingleClassCollection\AbstractSingleClassCollection
{
    protected $collectionClass = Foo::class;
}

About

An abstract class which provides provides an collection which only can only contain objects of a single class

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages