Created
November 29, 2012 20:25
-
-
Save jimbojsb/4171673 to your computer and use it in GitHub Desktop.
deduplicator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Deduplicator | |
{ | |
protected $items = []; | |
public function add($item) | |
{ | |
// name field will be in $item->name | |
$this->items[] = $item; | |
} | |
/** | |
* @return array an array of objects | |
*/ | |
public function getDeduplicatedItems() | |
{ | |
// magic | |
// assume we might want to add functionality to this beyond just name-based deduplication in the future at some point | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment