protected function __construct($profileId, array $profileData)
{
// Basic primitive fields
$this->profileId = $profileId;
$this->name = $profileData['name'];
$this->notes = $profileData['notes'];
$this->vendor = $profileData['vendor'];
// More complex fields that are not currently loaded into custom objects
$this->features = $profileData['features'];
$this->colors = $profileData['colors'];
$this->fonts = $profileData['fonts'];
$this->media = $profileData['media'];
// More complex fields that are loaded into custom objects
$this->codePages = array();
$this->codePageCacheKey = md5(json_encode($profileData['codePages']));
foreach ($profileData['codePages'] as $k => $v) {
$this->codePages[$k] = new CodePage($v, self::$encodings[$v]);
}
}