首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >用 Resume PHP 打造求职者在线专业简历

用 Resume PHP 打造求职者在线专业简历

作者头像
Tinywan
发布2025-07-21 09:25:44
发布2025-07-21 09:25:44
8100
代码可运行
举报
文章被收录于专栏:开源技术小栈开源技术小栈
运行总次数:0
代码可运行

Resume PHP 是一个开源项目库,它提供了一种类型安全的方式来按照JSON Resume模式构建和处理简历。

旨在创建一个标准化的、机器可读的简历格式。该项目使用 JSON 格式来定义简历的结构,并提供了一个 JSON Schema 来验证简历数据的正确性。通过这种方式,用户可以轻松地创建、共享和验证他们的简历数据。

安装

代码语言:javascript
代码运行次数:0
运行
复制
composer require juststeveking/resume-php

基本使用

构建基本摘要

代码语言:javascript
代码运行次数:0
运行
复制
use JustSteveKing\Resume\Builders\ResumeBuilder;
useJustSteveKing\Resume\DataObjects\Basics;
useJustSteveKing\Resume\DataObjects\Location;
useJustSteveKing\Resume\DataObjects\Profile;
useJustSteveKing\Resume\Enums\Network;

// Create the basics section
$basics = new Basics(
    name: 'John Doe',
    label: 'Software Engineer',
    email: 'john@example.com',
    url: 'https://johndoe.com',
    summary: 'Experienced software engineer with 5+ years in web development.',
    location: new Location(
        address: '123 Main St',
        postalCode: '94105',
        city: 'San Francisco',
        countryCode: 'US',
        region: 'CA',
    ),
    profiles: [
        new Profile(Network::GitHub, 'johndoe', 'https://github.com/johndoe'),
        new Profile(Network::LinkedIn, 'johndoe', 'https://linkedin.com/in/johndoe'),
    ],
);

// Build the résumé
$resume = (new ResumeBuilder())
    ->basics($basics)
    ->build();

// Convert to JSON
$json = json_encode($resume, JSON_PRETTY_PRINT);

增加工作经验

代码语言:javascript
代码运行次数:0
运行
复制
use JustSteveKing\Resume\DataObjects\Work;

$resume = (new ResumeBuilder())
    ->basics($basics)
    ->addWork(new Work(
        name: 'Tech Corp',
        position: 'Senior Developer',
        startDate: '2020-01-01',
        endDate: '2023-12-31',
        summary: 'Led development of core platform features',
        highlights: ['Improved performance by 40%', 'Mentored junior developers'],
    ))
    ->addWork(new Work(
        name: 'Startup Inc',
        position: 'Full Stack Developer',
        startDate: '2018-01-01',
        endDate: '2019-12-31',
    ))
    ->build();

添加教育

代码语言:javascript
代码运行次数:0
运行
复制
use JustSteveKing\Resume\DataObjects\Education;
use JustSteveKing\Resume\Enums\EducationLevel;

$resume->addEducation(new Education(
    institution: 'University of Technology',
    area: 'Computer Science',
    studyType: EducationLevel::Bachelor,
    startDate: '2014-09-01',
    endDate: '2018-06-01',
));

添加技能

代码语言:javascript
代码运行次数:0
运行
复制
use JustSteveKing\Resume\DataObjects\Skill;
use JustSteveKing\Resume\Enums\SkillLevel;

$resume->addSkill(new Skill(
    name: 'PHP',
    level: SkillLevel::Expert,
    keywords: ['Laravel', 'Symfony', 'API Development'],
));

生成简历 resume.json

代码语言:javascript
代码运行次数:0
运行
复制
{
  "basics": {
    "name": "John Doe",
    "label": "Programmer",
    "image": "",
    "email": "john@gmail.com",
    "phone": "(912) 555-4321",
    "url": "https://johndoe.com",
    "summary": "A summary of John Doe…",
    "location": {
      "address": "2712 Broadway St",
      "postalCode": "CA 94115",
      "city": "San Francisco",
      "countryCode": "US",
      "region": "California"
    },
    "profiles": [{
      "network": "Twitter",
      "username": "john",
      "url": "https://twitter.com/john"
    }]
  },
"work": [{
    "name": "Company",
    "position": "President",
    "url": "https://company.com",
    "startDate": "2013-01-01",
    "endDate": "2014-01-01",
    "summary": "Description…",
    "highlights": [
      "Started the company"
    ]
  }],
"volunteer": [{
    "organization": "Organization",
    "position": "Volunteer",
    "url": "https://organization.com/",
    "startDate": "2012-01-01",
    "endDate": "2013-01-01",
    "summary": "Description…",
    "highlights": [
      "Awarded 'Volunteer of the Month'"
    ]
  }],
"education": [{
    "institution": "University",
    "url": "https://institution.com/",
    "area": "Software Development",
    "studyType": "Bachelor",
    "startDate": "2011-01-01",
    "endDate": "2013-01-01",
    "score": "4.0",
    "courses": [
      "DB1101 - Basic SQL"
    ]
  }],
"awards": [{
    "title": "Award",
    "date": "2014-11-01",
    "awarder": "Company",
    "summary": "There is no spoon."
  }],
"certificates": [{
    "name": "Certificate",
    "date": "2021-11-07",
    "issuer": "Company",
    "url": "https://certificate.com"
  }],
"publications": [{
    "name": "Publication",
    "publisher": "Company",
    "releaseDate": "2014-10-01",
    "url": "https://publication.com",
    "summary": "Description…"
  }],
"skills": [{
    "name": "Web Development",
    "level": "Master",
    "keywords": [
      "HTML",
      "CSS",
      "JavaScript"
    ]
  }],
"languages": [{
    "language": "English",
    "fluency": "Native speaker"
  }],
"interests": [{
    "name": "Wildlife",
    "keywords": [
      "Ferrets",
      "Unicorns"
    ]
  }],
"references": [{
    "name": "Jane Doe",
    "reference": "Reference…"
  }],
"projects": [{
    "name": "Project",
    "startDate": "2019-01-01",
    "endDate": "2021-01-01",
    "description": "Description...",
    "highlights": [
      "Won award at AIHacks 2016"
    ],
    "url": "https://project.com/"
  }]
}
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2025-07-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 开源技术小栈 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装
  • 基本使用
    • 构建基本摘要
    • 增加工作经验
    • 添加教育
    • 添加技能
  • 生成简历 resume.json
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档