I am writing a code for accounting system where the main accounting class is to load a class that contains a schedule for the firms reporting cycle with information such as fiscal year, tax schedules. The reporting cycle class does do not extend the main accounting class, but am trying to implement a pattern where the reporting cycle classes names can register be registered with the main accounting class on the constructor and it instantiates them and controls data access to them.
Is it possible to instantiate an object using the class name, maybe using a concept similar to variable functions where one would do
function a_function(){
echo "I am a function";
}
$func="a_function";
$func();
Thanks in advance


Sign In
Create Account


Back to top









