public static function fromYAML($filename) { $parser = new \Nathanmac\Utilities\Parser\Parser(); $config = $parser->yaml(file_get_contents($filename)); return new self($config['user_id'], $config['user_password'], $config['partner_id'], $config['partner_password']); }