tWithMakefiles
MMO\core\classes · 1 symbol · generated 5 Oct 2026
tWithMakefiles
tWithMakefiles.php:19Trait giving a class a named collection of iMakefile builders (e.g. one per asset type: 'scss', 'js', ...), each tied to an output filename, with a uniform way to (re)build one/some/all of them.
- Namespace
MMO\core\classes
Index
| makefiles | ||
| getMakefile($type) | ||
| getMakefiles() | ||
| hasMakefile($type) | ||
| make($types, $opts) | Automake the makefiles | |
| moveMakeFile($type, $filename) | Change a registered makefile's output filename (moving/renaming its build target). | |
| removeMakefile($type, $removeLink) | Unregister a makefile. | |
| setMakefile($type, $filename, $makefile) | Register a makefile under $type, and point it at $filename. |
Properties1
makefiles
Methods7
getMakefile($type)
tWithMakefiles.php:38getMakefiles()
tWithMakefiles.php:28| returns | every registered makefile, keyed by its $type |
hasMakefile($type)
tWithMakefiles.php:89| $type | ||
| returns | bool | true if a makefile is registered under $type |
make($types, $opts)
tWithMakefiles.php:104Automake the makefiles
| $types = null | array | string | null | the type(s) to build (a single type, a list of types, or null for every registered makefile) |
| $opts = [] | array | options forwarded to each makefile's autoMake() |
| returns | ||
| throws | if any of $types is not registered |
moveMakeFile($type, $filename)
tWithMakefiles.php:81Change a registered makefile's output filename (moving/renaming its build target).
removeMakefile($type, $removeLink)
tWithMakefiles.php:65Unregister a makefile. Logs a warning (does not throw) if $type is not registered.
| $type | string | |
| $removeLink = true | bool | if true (the default), also clear the makefile's own filename (setFilename(null)) before dropping it |
| returns |
setMakefile($type, $filename, $makefile)
tWithMakefiles.php:51Register a makefile under $type, and point it at $filename.
| $type | string | an arbitrary identifier for this makefile (e.g. 'scss', 'js') |
| $filename | string | the output file this makefile builds |
| $makefile | iMakefile | |
| returns | iMakefile | $makefile, for chaining |