public static function fromString($string, $name = '') { $profile = new self(); $profile->domain = 'tiki://local'; $profile->profile = $name; $profile->pageUrl = $name; $profile->url = 'tiki://local/' . $name; $content = html_entity_decode($string); $profile->loadYaml($content); return $profile; }