/** * 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; }
/** * 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); }