Note that there are some explanatory texts on larger screens.

plurals
  1. USphant0m
    primarykey
    data
    text
    plurals
    1. COYes, I agree with you about that, passing a string instead is virtually the same thing. Maybe I haven't made the use of this class clear enough: It will be used to deal with paths internally which will always be dependant on the implementation on which PHP will be run, not with client code in that sense. So autodetecting would be my choice - I was just wondering why you presentend your example in this fashion, and was wondering what the deeper sense is behind this method.
      singulars
    2. CO(leaving my initial comment for completeness' sake) - Ok I can see what you mean. I agree with you, that your approach makes perfect sense for most adaptor/adaptee cases, but I in this example when it is about wrapping OS dependent functionality, I feel that manually injecting the adaptor and defining an interface for the adaptor is overkill in this particular case. My intention is, to have the caller not care about the implementation details, hence injecting the Adaptee is not appropriate, there is going to be two, maybe thee possibilities: Linux/Unix(Mac) and Windows.
      singulars
    3. CODo you mean for the both adaptor and adaptees, or are you refering solely to adaptees? I wouldn't want to make them static really, because I cannot see a reasonable implementation really. The adaptor however, is meant to be more of a pseudo-namespace to provide some library/utility functions. Also I don't like the idea of having to instantiate it every time I want to use it (I could use a factory instead I guess)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload