private function __construct(UserPointDO $point) { $this->point = $point; $this->class = FoldedResourcesManager::inst()->getFoldedEntityByDbCode($point->getReasonId())->getClassInst(); PsUtil::assertInstanceOf($this->class, 'PointsGiver'); }