I have a class called posts and i have a class called cars that extends from posts - the car class has some more functionality than the post class, as example the car class has a "price" property and a method called "loadBrandImage()" and later I want to extend my project with modules.
Let's say i have a Module that shows a map created from the location property inside my car class.
So when the module is loaded the car class should extend with the "location" property and the "generateMap" method.
The question is, how can i dynamic add Functions and declare Properties in classes?