Simple way to pass object properties to next
<p>This might be a bit hard to comprehend so I apologize in advance if this is not clear enough.</p>

<p>I'm writing my own MVC framework and am once again stuck. </p>

<p>I am in the process of writing the controller classes for the framework. Basically this is how it works:</p>

<ul>
<li>Instantiate class coreController which extends abstract class </li>
<li>coreController sets controller to be loaded by interpreting query string</li>
<li>query string values stored in variables</li>
<li>other variables assigned values</li>
<li>new controller is loaded</li>
<li>new controller checks if an action object needs to be instantiated.</li>
<li>new actioncontroller is loaded</li>
<li>action controller checks if it is the final object required.</li>
<li>action controller is returned as an object to be referenced during the rest of the script. </li>
</ul>

<p>generic $controller->method() can be called and references final controller loaded.</p>

<p>Another overview:</p>

<pre><code>coreController
    pageController
       pageControllerActionAdd
       return as object to start

$controller-&gt;something(); //References pageControllerActionAdd
</code></pre>

<p>Esentially what I want to be able to do is be able enter a url like:
<a href="http://www.mywebsite.com/page/modify/" rel="nofollow">http://www.mywebsite.com/page/modify/</a></p>

<p>and have the script pull up the PageModifyController as a variable so I can execute it's methods.</p>

<p>If you can tell me a better method for what I am doing please go ahead. You don't have to write any code, just the idea would be great. It is just that the way I am currently doing is very confusing and hard to debug. I will end up with multiple nested objects and I don't like the concept of that. </p>

<p>I've been reading a lot of other source code and found that it too can be quite sophisticated.</p>
