title: PHP class design - including a whole class just for a constant?
body: <p>I'm a relative newb and looking for some advice on PHP class design.</p>
  
  <p>If I have a class (lets call it class A) and it performs a database query that requires a constant defined in class B. It looks as though I have three options:</p>
  
  <p>1) Include/require/use the whole class B. Pro: Follows a purer OO approach Con:The whole class has to be loaded just to get access to a constant.</p>
  
  <p>2) Define a separate constants class. Pro:Centralised constant definitions. Con:Goes against encapsulation, more IO processing time with additional includes.</p>
  
  <p>3) Duplicate the class B constant within class A. Pro:Seems to be the best option in terms of processing Con:Duplicate definitions within the OO model.</p>
  
  <p>I'd appreciate any input on this..</p>