Created
December 25, 2014 12:54
-
-
Save morontt/ff3c02e8896b09d3cb73 to your computer and use it in GitHub Desktop.
PHP Setter Method
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
| /** | |
| * @param ${TYPE_HINT} $${PARAM_NAME} | |
| #if (${STATIC} != "static") | |
| * @return $this | |
| #end | |
| */ | |
| public ${STATIC} function set${NAME}($${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