Пример #1
0
 /**
  * Retuns a single instance of the PoserCore object that controls everything.
  * @return PoserCore
  */
 private static function getPoserCore()
 {
     if (null == self::$poserCore) {
         self::$poserCore = PoserCore::build();
     }
     return self::$poserCore;
 }
Пример #2
0
 /**
  * Creates and returns the mock built by the builder
  *
  * @return mixed The mocked object
  */
 public function mock()
 {
     $options = new MockOptions();
     $options->setDefaultAnswer($this->defaultAnswer);
     $options->setName($this->name);
     $options->setMockStatic($this->mockStatic);
     $options->setConstants($this->constants);
     return $this->poserCore->mock($this->class, $options);
 }