216 reputation
18
bio website
location
age
visits member for 2 years, 2 months
seen Jul 2 at 4:21

Jul
2
awarded  Curious
Jul
2
accepted Do objects maintain identity under all non-cloning conditions in PHP?
Jun
8
revised Do objects maintain identity under all non-cloning conditions in PHP?
added some detail about my understanding of PHP objects and the clone operator
Jun
8
comment Do objects maintain identity under all non-cloning conditions in PHP?
Are you sure about that? I just found this stackoverflow question whose chosen answer states that you do not need to use & with objects. I suppose that fairly soon I will find out for myself once my code is wired and I start testing it. SO: stackoverflow.com/questions/2715026/…
Jun
8
asked Do objects maintain identity under all non-cloning conditions in PHP?
May
15
comment Many-to-many in OOP: Class A instantiates Class B, which instantiates Class A, which
I'm thinking perhaps my third-party would use the "builder pattern." I guess I'll not have the circular dependencies in the constructor. The builder will (somehow?) know which objects to create and then throw them together. Voila. I'm new to design patterns. But my application is getting too complex for me to just keep hacking away at it without a grander scheme.
May
15
comment Many-to-many in OOP: Class A instantiates Class B, which instantiates Class A, which
@teresko I have a mysql database. I have to access it somehow, right?
May
14
asked Many-to-many in OOP: Class A instantiates Class B, which instantiates Class A, which
Apr
27
comment Dependency injection for request variables in a web application
You have to put $_GET['id'] somewhere, though. Should it be outside of all classes, in a functional area of the code? Or should there be a class whose sole purpose is to take globals into itself and instantiate objects of other classes based on them?
Apr
27
awarded  Yearling
Apr
27
asked Dependency injection for request variables in a web application
Apr
8
answered How should one debug a PHP web application securely without exposing secrets to competitors?
Feb
22
comment Is it bad habit not using interfaces?
I enjoyed reading the quoted section, as well as what came before it.
Feb
22
comment Does it make sense to break fluid interface if a bad argument is passed?
I'm just thinking about the advantages/disadvantages. When you stop program execution you know for sure there's been an error without a doubt. But if I return $this no matter whether there was an error or not, then things keep rolling.
Feb
22
asked Does it make sense to break fluid interface if a bad argument is passed?
Dec
29
asked How to prevent re-checking already-checked data?
Nov
7
accepted How can a collection class instantiate many objects with one database call?
Nov
4
comment How can a collection class instantiate many objects with one database call?
I was using a lot of static methods for loading multiple objects. You don't have to use public setters. You can do one database call and load thousands of objects. If I use an object.loadFromDB(), then I have to call it on each one. The OOP solution would seem to be a collection class whose loadFromDB() method would achieve the same result. But then I have to make the setters of the base class public to everyone!
Nov
4
comment How can a collection class instantiate many objects with one database call?
The constructor is public, taking an integer $id to load the object from the db. I think the core of my problem is that I want to load multiple objects with one db query. I need something that can get the data, then instantiate a bunch of the target object. But how can I give a class that power without making methods public to every class?
Nov
4
comment How can a collection class instantiate many objects with one database call?
I'm experimenting with different methods of loading and right now I have several co-existing. All of my properties are non-public, but many classes have public get/set. Sometimes I havec onstructors that take a db id for existing data and 0/null to create new. Sometimes I have a static method that can save multiple data entities at once. Sometimes I have an object save() method. This is all still pretty new to me.