Last active
September 24, 2015 12:51
-
-
Save Akii/efa6c9524f2dba5c5ee4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Some\Model; | |
class YourModel { | |
/** | |
* @var Collection<Asdf> | |
*/ | |
protected $asdfs; | |
... | |
/** | |
* @return Asdf[] | |
*/ | |
public function getAsdfs() { | |
// loads the collection, so not always a good idea | |
return $this->asdfs->toArray(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment