ThinkMedical Another oop thing lets say i have some customers I have a class Customer with the constructor fetching

get('db'); ?

Wolfpaws doesn't like n00b scripts like away messages.

k. Thx.

unless it's coded in PHP

what's all that registry talk?

if database object isn't in the registry, create it and assign it to the registry, and assign it to a protected property, if it is in the registry, get it and assign it to that protected property.
uif database object isn't in the registry, create it and assign it to the registry, and assign it to a protected property, if it is in the registry, get it and assign it to that protected property./u
then each model will extend from that functionality
rolfen, it's a website design pattern that basically moves objects in and out of different scopes

so you mean it's not like windows registry? Blasphemy

:o

well its a little like windows registry

yes, i think i hear flying chairs

but windows blew it out of all proportion

I never want to hear those words come out of your mouth again young man
bI never want to hear those words come out of your mouth again young man/b
ubI never want to hear those words come out of your mouth again young man/b/u

SOAP is worse than soap

rolling a little off topic - there is a linux version of the 'registry' it's actually quite nice.

uhh caffinated yeah… it's called /etc/

Can I put a few requires outside a class definition in a php host file?

caffinated gedit looks like regedit afaik

no, /etc/ is a mess of crap which is all in different formats and may not even be in the same place from distro to distro

Also, if I create a new object outside the class, can I still access it in the class?

caffinated, that's the distro maintainers fault

i meant gconf-editor

no Veejay

it's everyone's fault for not agreeing on a standardized format.

and different formats is ok

global configurations are *supposed* to be in /etc

this is why distros force you to stare at a diff editor when updating sometimes.

That's a global no?
For both questions?

$x = new Object(); $y = new ObjectTwo(); $y cannot access $x unless you use a registry pattern/the global keyword/ $y = new ObjectTwo($x);

caffinated, better than having a single point of failure

or singleton i suppose

If Im working on a project with someone else, and the files are hosted on my server, and Im the one who coded the core, does that mean it legally belongs to me?

which is why it's a nightmare in windows

what makes you think a registry is a single file?

it's not a single file
but it's a single point of failure

you have the copyright on what you coded FusE|

registry are 2 files

What if now I create the object inside the class definition, is that problematic?

a registry doesn't imply 1 or 2 files.
that's just the way MS did theirs

@ThinkMedical: So If we had a disagreement and I wanted to kick him off, I can't keep anything he coded?

Wolfpaws in windows? there's one file for each hive

class myObject { __construct() { $this-db = new Database(); } } is fine Veejay

yeah I am pretty sure windows have several files

i dont believe so, FusE|

okay

Yeah, but I will have a dozen function in the class, where I need to access my database
Should I create an instance inside each function?

unless youve bought it off him, or there are torts etc. licences etc. FusE|

%windows_dir%/file.ini isn't a registry

He hasn't coded much, Ive done most everything, and hes become lazy, so I want to kick him off

no… use $this-db inside the other functions

Oh yeah
Stupid me
Thanks man

it depends on your agreement

what channel should i go to and talk about the dumbest shit?

for all intents and purposes, a setting registry is just a sane interface to get at key/value pairs. this doesn't imply anything in the physical storage mechanism

Wolfpaws, thats the problem, we had none

#stupidity

k

the filesystem itself could be the organizational method.

empty ;o

z4chh #phpc is for php social talk

still a single point in failure.

not really.

so is the OS cyth

well, then, just kick him off, and if he wants to take what belongs to him, give him, and code your version from scratch

so really

Wolfpaws, I coded the core and everything, I think he coded like 1 file

in fact, it's probably less prone to damage than the current configuration soup that linux hosting has right now

Then it shouldn't be much of a problem, should it?

again, why windows is so regularly attacked, the organization on the filesystem is not really a valid argument. there's still a single point of entry for all of it

nope, thanks

you keep saying 'single point of failure' like you even have any idea of the implementation.

it is a single point of failure
i have seen many registry failures

caffinated, I don't really have to, it's what a registry implies

nobody is discussing windows.

no?
oh

windows is just the example where registries can go wrong

any system which is required for another other system to work, by your implied definition, is a single point of failure

what if the implementation is just a standardized directory structure in which collections of key/value pairs exist in flat files?

ThinkMedical, yes

then really it's not any different from /etc/ - except that it's easy to find and change things because not every person is using a different configuration format.
and your 'single point of failure' is basicly _the_same_ as /etc/

caffinated, much much better, but still a single point of entry, and second a darwin like weakness….
ucaffinated, much much better, but still a single point of entry, and second a darwin like weakness…./u

so, what you're saying is that organizing the files in to directories under /etc/ in a better way and making the TEXT files consistant is a weakness?

depends if you believe in security through obscurity or not

are you on glue?

sometimes

must be something strongher. Glue doesn't hit so hard.

 JAVA Web Hosting | JAVA Hosting

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: