In Depth Magento Dispatch: Standard Router
Last time we talked about what goes on with router objects in Magento's front controller object. Now it's time to dig into the router objects themselves.
astormLast time we talked about what goes on with router objects in Magento's front controller object. Now it's time to dig into the router objects themselves.
astormRouting is the heart of every web application framework. Requests flow from the internet to your web application. The routing engine takes the information from those requests and sends it to your code. Then, new information (ripe with oxygen, if we want to stretch
astormFrom the standard router class in Magento. /** * @deprecated * @see _includeControllerClass() */ protected function _inludeControllerClass($controllerFileName, $controllerClassName) { return $this->_includeControllerClass($controllerFileName, $controllerClassName); }
astormThis isn’t even Magento 101, it’s Magento Middle School, but it accounts for 25% of the questions people email me about Magento. If you want to avoid URLs in the form of http://magento.example.com/index.php/foo/baz/bar and instead have http://magento.example.com/foo/baz/bar Make sure your webserver is setup toead .htaccess [...]
astorm1.6 resource models in a nutshell 1: Complete rewrite, core resource model class prefixes now seem to be <class-prefix>_Resource 1.6 resource models in a nutshell 2: Fallback to old resource models if rewrite is defined (supported via <deprecatedNode>) 1.6 resource models in a nutshell 3: MySQL specifics removed, new resource [...]
astormA quick tip and link on the weird (in PHP land) way the Magento image helpers rely on casting for basic functionality.
astormPerils of Caching If you’re trying to reuse Magento block classes that have caching enabled, there’s a few things you’ll want to be aware of.
astormThis one might be greek to people who haven’t read No Frills Magento Layout, but I’d like it spelled out so I don’t have to think about it again. (If you don’t own a copy, there are worse ways to learn Magento). When Magento is loading handles from the Layout Update XML Files into the package layout, these updates [...]
astormCasting Image Helpers Image helper objects are tricky. Instead of having a “get image url” function, you cast them as a string to get the URL, or more commonly, let PHP cast them in echo statements automatically. However, if you’re not familiar with PHP’s casting rules, it look like the init method returns a [...]
astormSee how I've replaced last week with recently? Marketing genius there.
astorm