Closed 13rac1 closed 7 years ago
Looks like this was added in 7.md. However, that section could use some excercises.
Suggested exercise:
- Add a namespace to the top of your file, this will put all classes defined in that file into that namespace.
- Add a constant or static variable to one of your classes / interfaces.
- Print the constant/static by calling the full namepaced name of your class.
- Add a use statement, and print your constant/static again using the short namespace of your class.
This is now PR #11
Ah ha! Yes it was mostly fixed in https://github.com/chapter-three/oophp-training/commit/97230c27b35eedd9ca493e429ca655e2ab64cd5b
You can git commit --amend
#11 to close this issue IMO.
Merged #11 thanks for the addition!
If this training is going to be re-used, one of the lessons should cover the
namespace
and theuse
keywords since both are relevant to Drupal 8.http://php.net/manual/en/language.namespaces.php http://php.net/manual/en/language.namespaces.importing.php
src: http://www.sitepoint.com/building-drupal-8-module-blocks-forms/