public static function from($subject)
{
if ($subject instanceof ModelInterface) {
$ret = call_user_func_array('static::fromModel', func_get_args());
} elseif ($subject instanceof Simple) {
$ret = call_user_func_array('static::fromResultset', func_get_args());
} elseif (is_array($subject)) {
$ret = call_user_func_array('static::fromArray', func_get_args());
} else {
throw new \InvalidArgumentException(static::E_INVALID_SUBJECT);
}
return $ret;
}