Tagged Questions
6
votes
2answers
387 views
Any way to improve the performance of this PHP class?
I have been developing this class, and was wondering if anyone had any thoughts on how I can improve the performance of it.
...
4
votes
2answers
750 views
Validation Class - Feedback Welcome!
I have written a Validation and Form class in PHP.
Validation class allow you to define the ...
4
votes
1answer
1k views
How to improve Try…Catch Block for PDO?
I have written a PDO wrapper and a class file like a model. So far, it's looking so good! I am just confuse where I should put Try...Catch block - Would it be ...
3
votes
1answer
362 views
How to convert my classes to Dependency injection?
I am still learning to develop my skills in OOP.
It uses a combination of the factory and its real singletons?
As I did more research, I have realized this design pattern is bad because of global ...
3
votes
1answer
59 views
advantage of using __call method
I have wrote simple class that allowing database selection and inserts.Could you please tell me does this a right way to use __call method with any useful advantage of it ?
...
3
votes
1answer
66 views
Get Ancestor Class Name that Defines CONST in PHP?
I have a class hierarchy in PHP and in some of the parent classes I have defined a constant, let's assume that constant is called TYPE for my example.
I want to ...
3
votes
1answer
494 views
Cookie Management Class
I wrote this class to make cookie management easier.
I know it makes use of serialize(), but I have no intention of storing very much data in the cookie, and it ...
3
votes
1answer
1k views
PHP Config Class
I'm working on a config class for PHP, where I can easily bring in config options. Any improvements/suggestions are appreciated.
Example usage:
...
2
votes
1answer
89 views
“Property Container” design-pattern
I've tried to write my Property Container design-pattern implementation.
Could anybody, please, tell me, if this code is really what I intended to write (follows ...
1
vote
1answer
425 views
PHP Lazy loading with __get - yay or nay?
I have my own PHP MVC framework that I'm iteratively developing (i.e. adding a feature when I have the time). I'm trying to keep it to the best practices I can, while still adding the most in terms of ...
1
vote
1answer
4k views
how to properly use database connections in PHP classes
I need some advice\suggestions on how to create\handle database connections for a project I'm working on. I'm creating a simple work order system for my company using PHP 5.4.3, right now there isn't ...
1
vote
0answers
10 views
Application Class Security
Is my Application.php class secure for continuing development?
The Application.php acts as a registry for the whole application. I tried not to rewrite already working code that is being pulled from ...
0
votes
1answer
193 views
Review of my PHP Wrapper around Third Party Soap API
I have written a wrapper for Soap based 3rd party web service.
https://gist.github.com/veganista/bd940750d9e240e63b89
I'm pretty happy with it so far (I think, anyway). It's only a small sub-set of ...