Skip to content

Instantly share code, notes, and snippets.

@saksmt
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saksmt/da32d3c26e564d9eb50b to your computer and use it in GitHub Desktop.
Save saksmt/da32d3c26e564d9eb50b to your computer and use it in GitHub Desktop.
/**
* @param ${TYPE_HINT} $${PARAM_NAME}
#if (${STATIC} != "static")
* @return ${CLASS_NAME} This instance
#end
*/
#set($TYPE_HINT = $TYPE_HINT.replaceAll("(int(eger)?)|(bool(ean)?)|(string)|object|mixed", ""))
#if (${TYPE_HINT} != "")
#set($TYPE_HINT="${TYPE_HINT} ")
#end
public ${STATIC} function set${NAME}(${TYPE_HINT} $${PARAM_NAME})
{
#if (${STATIC} == "static")
self::$${FIELD_NAME} = $${PARAM_NAME};
#else
$this->${FIELD_NAME} = $${PARAM_NAME};
return $this;
#end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment