title: Execute method once for each child class
body: <p>I am trying to execute <code>initialize()</code> method for each class that extends from a baseClass, by using <a href="http://php.net/manual/en/language.oop5.late-static-bindings.php" rel="nofollow noreferrer">late static bindings</a>:</p>
  
  <pre><code>class BaseClass 
  {   
      protected static $initialized = false;
  
      public static function find()
      {
          static::initialize();
          //TODO search entries and return as instances...
      }
  
      protected static function initialize() 
      {
          if (static::$initialized) 
              return;
  
          echo 'Initializing ', static::class, '&lt;br/&gt;';
          //do important stuff
          static::$initialized = true;
      }
  }
  
  class Child1 extends BaseClass {}
  class Child2 extends BaseClass {}
  </code></pre>
  
  <p><code>$initialized</code> property is being shared across the extending classes.</p>
  
  <pre><code>Child1::find(); //Outputs 'Initializing Child1', as expected
  Child2::find(); //Doesn't execute 'initialize()' because 
                  //$initialized property was set to true by Child1
                  //Expected: 'Initializing Child2'
  </code></pre>
  
  <p>Is there a simple way to achieve it? </p>