本文整理汇总了PHP中PDOConnection::connectINIT方法的典型用法代码示例。如果您正苦于以下问题:PHP PDOConnection::connectINIT方法的具体用法?PHP PDOConnection::connectINIT怎么用?PHP PDOConnection::connectINIT使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDOConnection
的用法示例。
在下文中一共展示了PDOConnection::connectINIT方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: revisionData
public function revisionData()
{
$dao = new JobRevisionDataDao(PDOConnection::connectINIT());
$data = $dao->getData($this->request->id_job, $this->auth_param);
$result = new Json_RevisionData_Job($data);
$this->response->json($result->render());
}
示例2: uniqid
<?php
require_once 'vendor/autoload.php';
require_once './inc/Bootstrap.php';
require_once './lib/Model/queries.php';
Bootstrap::start();
// FIXME: apis use PDO in some case which requires a different connection
// object than the one instantiated by Database::obtain.
require_once 'lib/Model/PDOConnection.php';
PDOConnection::connectINIT();
$db = Database::obtain(INIT::$DB_SERVER, INIT::$DB_USER, INIT::$DB_PASS, INIT::$DB_DATABASE);
$db->connect();
Log::$uniqID = uniqid();
$klein = new \Klein\Klein();
// This is unreleased APIs. I'm no longer fond of the [i:id_job] in the path,
// so before releasing change it use a querystring.
//
$klein->respond('GET', '/api/v2/jobs/[i:id_job]/revision-data', function () {
$reflect = new ReflectionClass('API_V2_JobRevisionData');
$instance = $reflect->newInstanceArgs(func_get_args());
$instance->respond('revisionData');
});
$klein->respond('GET', '/api/v2/jobs/[i:id_job]/revision-data/segments', function () {
$reflect = new ReflectionClass('API_V2_JobRevisionData');
$instance = $reflect->newInstanceArgs(func_get_args());
$instance->respond('segments');
});
$klein->respond('GET', '/api/v2/project-completion-status/[i:id_project]', function () {
$reflect = new ReflectionClass('API_V2_ProjectCompletionStatus');
$instance = $reflect->newInstanceArgs(func_get_args());
$instance->respond('status');