Created
July 6, 2015 23:28
-
-
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.
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 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