Category Archives: MODX

Using Namespaces to Avoid Class-name Collisions

In the several previous articles, we looked at ways to prevent collisions between functions and classes. In this article, we’ll see how to handle that using PHP namespaces.

Tags: , | Posted under MODX, MODX | Leave a comment

Using an Autoloader to Load Classes

In the previous articles, we looked at ways to prevent collisions between functions and classes. In this article, we’ll see how to make that more convenient by using an autoloader …

Tags: , | Posted under MODX, MODX | Leave a comment

Handling Included Files

In the previous articles, we put our functions insi de a class and included the class file with a line like this: The problem with this code is that if …

Tags: , , | Posted under MODX, MODX | Leave a comment