๐ฐMacros
Besides the custom callers to call for custom attributes, you may also define your own custom functions, without extending or overwriting classes, using Macros.
In case you are not familiar with Macros, you can see the following example on defining a custom function for the K8sPod
instance.
$this
keyword used within the closure is going to reference the current K8sPod object in this example. You might as well define how many macros you want. The closure can also contain parameters or no parameters at all, based on your needs.
Macros also work with custom callers:
Last updated