Not all PHP classes have to be complex. Below is an example of a simple PHP class depicting the About Us page. I'm not going to list the other parts that are needed to make the class work, just the class itself to demonstrate that with enough planning certain classes can look exactly the same way.
Looking at the code, you'll notice that the displayBreadcrumb() method can be separated into it's own individual class as well (or frequently used code class) and an array of crumbs can be passed as the parameter with the key set to the name of the page and the value as the link to that page.
Looking at the code, you'll notice that the displayBreadcrumb() method can be separated into it's own individual class as well (or frequently used code class) and an array of crumbs can be passed as the parameter with the key set to the name of the page and the value as the link to that page.
Comments
Post a Comment