Destiny\Character\Progression::__construct PHP Method

__construct() public method

public __construct ( Character $character, array $properties )
$character Destiny\Character
$properties array
    public function __construct(Character $character, array $properties)
    {
        $definition = manifest()->progression($properties['progressionHash']);
        $properties = array_merge($properties, $definition->getProperties());
        parent::__construct($properties);
        $this->character = $character;
        if ($this->name == self::WEEKLY_PVE || $this->name == self::WEEKLY_PVP) {
            if (!$character->playedAfterWeeklyReset) {
                $this->level = 0;
            }
            $this->nextLevelAt = count($this->steps);
            $this->progressToNextLevel = $this->level;
        }
        $this->percentToNextLevel = $this->nextLevelAt ? $this->progressToNextLevel / $this->nextLevelAt * 100 : 100;
        $this->percentLabel = sprintf("%d / %d", $this->progressToNextLevel, $this->nextLevelAt);
        if ($this->isMaxed()) {
            $this->percentToNextLevel = 100;
            $this->percentLabel = 'MAX';
        }
    }