foo.php 739 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Bar;
  3. class FooClass
  4. {
  5. public $foo;
  6. public $moo;
  7. public $bar = null;
  8. public $initialized = false;
  9. public $configured = false;
  10. public $called = false;
  11. public $arguments = array();
  12. public function __construct($arguments = array())
  13. {
  14. $this->arguments = $arguments;
  15. }
  16. public static function getInstance($arguments = array())
  17. {
  18. $obj = new self($arguments);
  19. $obj->called = true;
  20. return $obj;
  21. }
  22. public function initialize()
  23. {
  24. $this->initialized = true;
  25. }
  26. public function configure()
  27. {
  28. $this->configured = true;
  29. }
  30. public function setBar($value = null)
  31. {
  32. $this->bar = $value;
  33. }
  34. }