Before PHP 5.3 was released, many programmers would suffix their classnames with the package and or module that it pertains to. For example, SessionHelper, UsersController, CommentModel, so on and so forth. But with the recent upgrade to namespaces, are these types of suffixes still required? Continue reading...
Ajax Handler v1.2
The Ajax Handler is a CakePHP Component that processes and handles AJAX requests. It determines what action should be dealt as an AJAX call, applies the appropriate filters, prepares the data for a response and responds with the appropriate headers.
Blog entries with the tag "Php"
Dec
16
16
PHP Pro Tip: Don't close your PHP documents with ?>
Topics: Tutorials, PHP & MySQL // 2 comments, 1,298 views
Recently on my Twitter I mentioned this exact tip, "PHP Pro Tip: Don't close your PHP documents with ?>.", and got many responses asking why or if its possible. I will briefly explain the benefits of this technique and when it applies. Many assumed I meant that you should never close your PHP scopes with ?>, but that's not the case, I was merely stating that the closing tag (at the very very bottom of your PHP file) does not need to be there. Continue reading...
Dec
7
7
Why pure OOP, just for the sake of doing pure OOP
Topics: PHP & MySQL, Personal // 3 comments, 934 views
Lately all I have seen is the "Pure OOP is the way to go mentality" without much reasons to back up why its beneficial. I write OOP code, but I don't write overly verbose, bloated and cluttered OOP code either. I attend Zendcon, I have my PHP certification, I read PHP blogs on a daily basis, I have had multiple OOP discussions with other developers, but in the end I still ask the question, "Why do you spend so much time writing and separating your objects? When in the end its unnecessary as you are not extending them in the future anyways." Continue reading...
Its been over a month since I posted an entry and even longer then that since it was a CakePHP entry. My goal was to post on average two entries a week, or at most 10 entries a month, but I have failed to do that so I am sorry. I mainly have been absent because of my new job I started on November 2nd, and it has been taking up most of my time and day. Furthermore, I haven't worked in CakePHP for months, seeing as how I have no new projects or features to add to my existing ones. Continue reading...
Oct
26
26
Fixing the missing Model and AppModel replacement errors
Topics: Tutorials, CakePHP // 4 comments, 737 views
If you are a CakePHP developer, I am almost certain you have run into this problem on multiple occasions. What problem are you referring to you ask? Well, the problem that you have when your Model is not being found and Cake automatically substitutes it with AppModel. Here's how to fix those problems. Continue reading...
By now most of you have heard that the awesome Nate Abele (which I had the privilege of talking to and partying with at Zendcon) is leaving the CakePHP team. A lot of developers were taken back by this and are unsure if they should continue to develop with CakePHP. Now, I find this ludicrous on many levels. Sure Nate was the lead developer, but that doesn't mean he was the only one. We still have the mighty Mark Story and the returning Larry Masters. Continue reading...
Jun
30
30
Uploader Plugin officially released!
Topics: Resources, Scripts, CakePHP // 8 comments, 2,021 views
For the past month I have been talking about CakePHPs lack of a built in uploader component or mechanism, and how I wanted to build one. Well I went ahead and did that, and now its available. The Uploader is primarily used as an all purpose file uploader and was built to not interact with a model/database. Here is a quick rundown of the plugin. Continue reading...
Many of you have heard me mention a component that keeps your Auth session active, even after the browser is closed. Well I think its time to officially announce it, my AutoLogin component. This component ties into the Auth component and allows a user to "remember me" to keep them constantly logged in. Continue reading...
Well its been a while since I have posted anything useful, and im sorry for the lack of activity. I actually have many post ideas up on my whiteboard, its just that I have been extremely busy lately. Tomorrow I will be going on a week long cruise to Canada, so I have been preparing for that all week. Besides preparing for my trip, I have been working on two of my own websites, I will review them both below. Both of which are CakePHP applications... for your information, hah. Continue reading...
Mar
31
31
Proxy Search - Doing a search while using named parameters
Topics: Tutorials, CakePHP // 0 comments, 2,371 views
While working on a project of mine, I wanted to be able to do a search, but have the post data be retained as named parameters (basically like a $_GET string). My first attempt was setting the form method to get, and trying to convert the $_GET by doing some mod_rewrite magic. This didn't work out at all, mainly because I couldn't get it to work for multiple named parameters. The only alternative I found was suggested by someone in the Google groups; they suggested posting a form to another action to deal with the logic, and finally redirect applying named parameters. This works perfectly, albeit adding an extra step in the process. Continue reading...
Popular Entries
Topics
- CakePHP (42)
- Entertainment (2)
- Gaming (4)
- HTML & CSS (1)
- Javascript (6)
- jQuery (6)
- Other (8)
- Personal (12)
- PHP & MySQL (18)
- Plugins (3)
- Programming (8)
- Resources (13)
- Reviews (1)
- Scripts (14)
- Tutorials (41)