Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RyanThompson/266445d43824c77afeb2 to your computer and use it in GitHub Desktop.
Save RyanThompson/266445d43824c77afeb2 to your computer and use it in GitHub Desktop.
Resolving methods usually support class transformation. You can also override them like this.
<?php namespace Acme;
use Anomaly\Streams\Platform\Entry\EntryModel;
class FooModel extends EntryModel
{
/**
* Return a new model collection.
*
* This method would typically look for
* a class at "Acme\FooCollection"
*
* @param array $items
* @return EntryCollection
*/
public function newCollection(array $items = [])
{
return new AwesomeCollection($items);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment