taleo/lib

此包已被废弃,不再维护。未建议替代包。

Taleo PHP 库

1.0 2013-08-16 08:59 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:26:47 UTC


README

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License

什么是 Taleo (来自维基百科) ?

Taleo 公司是一家总部位于加利福尼亚州都柏林的上市公司,提供基于云的人才管理解决方案。Taleo 的解决方案主要集中在人才获取(招聘)、绩效管理、学习和开发以及薪酬管理。这些功能结合在一起,提供了 Taleo 所称的“人才智能”或对候选人和员工的更深入洞察。Taleo 完全通过软件即服务 (SaaS) 模式销售其产品,在这种模式下,所有软件和信息都存储在 Taleo 运营和保障的数据中心中。截至 2011 年 8 月,Taleo 报告称拥有超过 5,000 名客户,从小型和中型企业到大型全球企业,其中包括福布斯 100 强企业中的近一半。2012 年 2 月 9 日,甲骨文公司同意收购 Taleo 公司。

什么是 Taleo PHP 库

Taleo PHP 库允许您通过 REST 连接到 Taleo 服务。它允许您检索数据,也可以创建和修改现有数据。

要求

安装

Taleo PHP 库使用 composer (https://getcomposer.org.cn/) 来管理其依赖。要开始,请安装 composer,然后运行命令:“composer install”。它将自动下载所需的库,然后您可以直接使用 Taleo PHP 库。

文档

示例

<?php
include_once './vendor/autoload.php';
use \Taleo\Main\Taleo as Taleo;

$user = '******';
$password = '******';
$company = '******';

/**
 * Create the Taleo object with a valid user, password and company code.
 */
$taleo = new Taleo($user, $password, $company);

// See the Monolog documentation to check which levels are available.
// By default, Taleo PHP Library doesn't log anything (log level set to ALERT)
// except ALERT, triggered by errors.
// If you change this to DEBUG, it will log almost everything.
// By default, the logfile is in the default PHP temporary directory,
// Under the name of "Taleo.log"
// You can use a second parameter to define the file to use.
// You can also use 'php://stdout' to debug quickly.
// Do not forget to disable the DEBUG level when in Production !
/**
 * Optional: Set the log configuration.
 * To update the settings, you just have to call the method with
 * updated parameters.
 *
 * @param int $level Logger level.
 *  \Monolog\Logger::DEBUG
 *  \Monolog\Logger::INFO
 *  \Monolog\Logger::WARNING
 *  \Monolog\Logger::ERROR
 *  \Monolog\Logger::CRITICAL
 *  \Monolog\Logger::ALERT
 * @param string $file Optional file.
 *  This can be a file or 'php://stdout'.
 *
 */
$taleo->setLogConfig(\Monolog\Logger::DEBUG, 'php://stdout');

/**
 * Mandatory: Run the login procedure.
 */
$taleo->login();

/**
 * Optional: Update the logging configuration
 */
$taleo->setLogConfig(\Monolog\Logger::DEBUG, 'php://stdout');

/**
 * Requisitions
 */
/*
$response = $taleo->get('object/requisition/search', array('status' => 'open', 'cws' => 1))->json();
$response = $taleo->get('object/requisition/1189')->json();
*/

/**
 * Create a candidate
 */
/*
$response = $taleo->post(
  'object/candidate',
  array(
    'candidate' =>
    array(
      'city' => 'Toontown',
      'country' => 'Be',
      'resumeText' => 'This is just a test using new TALEO API.',
      'email' => 'drupol@about.me',
      'firstName' => 'Polo',
      'lastName' => "Dell'Aiera",
      'status' => 2,
      'middleInitial' => 'P',
      'cellPhone' => '0123456789',
    )
  )
);
*/

/**
 * Search a candidate
 */
/*
$response = $taleo->get('object/candidate/search', array('email' => 'drupol@about.me'))->json();
$candid = $response['response']['searchResults'][0]['candidate']['candId'];
*/

/**
 * Update a candidate
 */
/*
$response = $taleo->put(
  'object/candidate/'.$candid,
  array(
    'candidate' =>
    array(
      'firstName' => 'Pol',
    )
  )
);
*/

/**
 * Delete a candidate
 */
/*
$response = $taleo->delete(
  'object/candidate/' . $candid
  );
*/

/**
 * Various
 */
//$response = $taleo->get('object/info');

/**
 * Optional: run the logout procedure
 */
//$taleo->logout();
?>

待办事项

  • 提供更多示例
  • 修复错误
  • 提供辅助函数
  • 注释所有函数 \o/

感谢

  • Will Robertson (@shoxty)