To be honest, it looks like a mess to me and it's difficult to read. Your naming convention is also off. They don't appear to do what you (or any other programmer) would think it does by looking at the name of your methods (not to mention your variables too).
Method
session_exist()
is not what it seems. It's not checking if a session exist, but it's rather checking if a session parameter exist. I would rename that toparameterExist()
.Method
create_session()
does not create sessions. It sets session parameters. I would call itsetParameter()
instead.Method
insert_value()
, what does it even do? :|So you're taking in a session name (?) and an array of data. Then you're checking if the session name is an array? And if it is you push the data array that's passed in to it? Is there any difference beween
create_session()
andinsert_value()
? I'm confused.
So you're taking in a session name (?) and an array of data. Then you're checking if the session name is an array? And if it is you push the data array that's passed in to it? Is there any difference beween create_session()
and insert_value()
? I'm confused.
- Why does your class contain a
sessionID
property?Why does your class contain a
sessionID
property?It looks like your using it to eh, differentiate between session objects? If that's the case the object itself can serve for that. Unless you have some other intentions for it I would just get rid of it and it's setter and getter.
It looks like your using it to eh, differentiate between session objects? If that's the case the object itself can serve for that. Unless you have some other intentions for it I would just get rid of it and it's setter and getter.
I could go on and on, but this should be enough to let you realize other obvious problems that are an issue with your code.