Skip to content

Instantly share code, notes, and snippets.

@lstrojny
Last active December 18, 2015 12:09
Show Gist options
  • Save lstrojny/5780823 to your computer and use it in GitHub Desktop.
Save lstrojny/5780823 to your computer and use it in GitHub Desktop.
<?php
class Factory
{
/**
* @param string:T $className
* @return T
*/
public function create($className)
{}
/**
* @param string:T $className
* @return T[]
*/
public function createList($className)
{}
}
/**
* @self T
*/
abstract class Model_Abstract
{
/**
* Will return Model_Abstract\Collection
*
* @return {T}\Collection
*/
public function getCollection()
{
}
/**
* Will return Model_Resource_Abstract
*
* @return {T/Model/Model_Resource}
*/
public function getResource()
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment