init(); } private function init() { $this->crops[] = new EconomixCrop(); $this->crops[] = new GoldenGardenFlowersCrop(); $this->crops[] = new GoldenGardenVegiesCrop(); $this->crops[] = new GoldenGardenGiantCrop(); $this->crops[] = new UkrSeedsNovikGiantCrop(); $this->crops[] = new UkrSeedsNovikMiniCrop(); $this->crops[] = new UkrSeedsNovikVegiesCrop(); $this->crops[] = new UkrSeedsNovikFlowersCrop(); $this->crops[] = new UkrSeedsTekVegiesCrop(); $this->crops[] = new UkrSeedsFloraMiniCrop(); $this->crops[] = new UkrSeedsFloraVegiesCrop(); } public function getCrop($crop_id) { return $this->crops[$crop_id]; } public static function getInstance() { if (null === self::$instance) { self::$instance = new self(); } return self::$instance; } }