Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
264 views

PHP MIMEType class

There isn't a very reliable way (in my opinion) to get the mime type of a specific extension, regardless of the file actually being of that type or not. This type of thing usually is used when ...
5 votes
2 answers
6k views

Validation and Form classes

I have written Validation and Form classes in PHP. Validation class allow you to define the ...
2 votes
2 answers
97 views

Simple class, solely for setting "globals"

I'm aiming for the best and simplest way to access "global" variables set in the config file for my website. So I can use them anywhere, even inside functions It's for file versioning, and I use ...
3 votes
2 answers
3k views

Validating basic data objects

I'm playing around with trying to do things in a better way, and in a class I have for sending emails, I have the concept of a recipient. This gets passed into my other classes essentially as a struct ...
2 votes
0 answers
77 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 ...
4 votes
1 answer
181 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 ? ...
4 votes
1 answer
3k 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 ...
2 votes
1 answer
877 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
1 answer
1k 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 ...
4 votes
1 answer
11k 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: ...
4 votes
1 answer
572 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 ...