Skip to content

Instantly share code, notes, and snippets.

@chriskite
Forked from jimbojsb/gist:4171673
Created November 29, 2012 20:28
Show Gist options
  • Save chriskite/4171686 to your computer and use it in GitHub Desktop.
Save chriskite/4171686 to your computer and use it in GitHub Desktop.
deduplicator
<?php
class Deduplicator
{
protected $items = [];
public function add($item)
{
// name field will be in $item->name
$this->items[] = $item;
}
public function getItems()
{
}
/**
* @return void
*/
public function deduplicate()
{
// 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