本文整理汇总了PHP中Provider类的典型用法代码示例。如果您正苦于以下问题:PHP Provider类的具体用法?PHP Provider怎么用?PHP Provider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Provider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getProviderDisplayName
function getProviderDisplayName()
{
$provider = new Provider();
$provider->person_id = $this->treating_person_id;
$provider->populate();
return $provider->person->getDisplayName();
}
开发者ID:jakedorst,项目名称:ch3-dev-preview,代码行数:7,代码来源:Visit.php
示例2: __construct
public function __construct(array $data)
{
$this->measureNumber = isset($data['measureNumber']) ? (int) $data['measureNumber'] : 0;
$this->denominator = isset($data['denominator']) ? (int) $data['denominator'] : 0;
$this->numerator = isset($data['numerator']) ? (int) $data['numerator'] : 0;
$this->exclusions = isset($data['exclusions']) ? (int) $data['exclusions'] : 0;
$this->percentage = isset($data['percentage']) ? sprintf('%.2f', $data['percentage']) : 0;
if (isset($data['visitDateStart'])) {
$this->visitDateStart = date('m-d-Y', strtotime($data['visitDateStart']));
} else {
$this->visitDateStart = date('01-01-Y');
}
if (isset($data['visitDateEnd'])) {
$this->visitDateEnd = date('m-d-Y', strtotime($data['visitDateEnd']));
} else {
$this->visitDateEnd = date('12-31-Y');
}
$provider = isset($data['provider']) ? $data['provider'] : '';
if (!$data['provider'] instanceof Provider) {
$providerId = (int) $provider;
$provider = new Provider();
$provider->personId = $providerId;
$provider->populate();
}
$this->provider = $provider;
if (isset($data['fileNumber'])) {
$this->fileNumber = (int) $data['fileNumber'];
}
if (isset($data['numberOfFiles'])) {
$this->numberOfFiles = (int) $data['numberOfFiles'];
}
}
开发者ID:dragonlet,项目名称:clearhealth,代码行数:32,代码来源:PQRIRegistryXML.php
示例3: _createAudit
protected function _createAudit($providerId, $personId, $visitId, $type)
{
$providerId = (int) $providerId;
$personId = (int) $personId;
$visitId = (int) $visitId;
$audit = array();
$audit['objectClass'] = 'GenericAccessAudit';
$audit['objectId'] = $personId . ';' . $visitId;
$audit['type'] = (int) $type;
$audit['userId'] = $providerId;
$audit['patientId'] = $personId;
$values = array();
$provider = new Provider();
$provider->personId = $audit['userId'];
$provider->populate();
$values['provider'] = $provider->toArray();
$patient = new Patient();
$patient->personId = $personId;
$patient->populate();
$values['patient'] = $patient->toArray();
$values['personId'] = $patient->personId;
$visit = new Visit();
$visit->visitId = $visitId;
$visit->populate();
$values['visit'] = $visit->toArray();
$values['visitId'] = $visit->visitId;
$audit['auditValues'] = $values;
Audit::persistManualAuditArray($audit);
}
开发者ID:dragonlet,项目名称:clearhealth,代码行数:29,代码来源:CcdController.php
示例4: registerAction
public function registerAction()
{
$request = $this->getRequest();
$registerForm = new RegisterProvider();
if ($request->isPost()) {
$postData = $request->getPost();
$registerForm->setInputFilter(new RegisterProviderValidator($this->getServiceLocator()));
$registerForm->setData($postData);
if ($registerForm->isValid()) {
$providerData = $registerForm->getData();
$providerData = $this->prepareDataProvider($providerData);
$providerEntity = new Provider();
$providerEntity->exchangeArray($providerData);
$providerData = $providerEntity->getArrayCopy();
$providerDao = $this->getServiceDao('Model\\Dao\\ProviderDao');
$saved = $providerDao->saveProvider($providerData);
if ($saved) {
$this->sendMailRegisterConfirm($providerData);
$this->flashMessenger()->addMessage($providerData['email']);
print_r($providerData);
die;
} else {
throw new \Exception("Not Save Row");
}
} else {
$messages = $registerForm->getMessages();
//print_r($messages);die;
$registerForm->populateValues($postData);
}
}
$view['providerForm'] = $registerForm;
return new ViewModel($view);
}
开发者ID:alectejada,项目名称:lakari,代码行数:33,代码来源:IndexController.php
示例5: __construct
public function __construct($tthis, $context, $data)
{
$this->tthis = $tthis;
$this->context = $context;
$this->data = $data;
$year = 0;
if (isset($tthis->_attributes['year'])) {
$year = (int) $tthis->_attributes['year'];
}
if (!$year > 0) {
$year = date('Y') - 1;
}
// default year to previous
$this->dateStart = date('Y-m-d', strtotime($year . '-01-01'));
$this->dateEnd = date('Y-m-d', strtotime($year . '-12-31'));
$this->providerId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
$providerId = (int) $this->context;
if ($providerId > 0) {
$this->providerId = $providerId;
}
$info = array();
$info['dateStart'] = $this->dateStart;
$info['dateEnd'] = $this->dateEnd;
$provider = new Provider();
$provider->personId = $this->providerId;
$provider->populate();
$info['provider'] = $provider;
self::$info = $info;
}
开发者ID:dragonlet,项目名称:clearhealth,代码行数:29,代码来源:NQF.php
示例6: testGetProviderException
/**
* @covers mychaelstyle\storage\Factory::getProvider
* @covers mychaelstyle\ProviderFactory::getProvider
* @covers mychaelstyle\storage\Factory::getPackage
* @covers mychaelstyle\storage\Factory::getPath
*/
public function testGetProviderException()
{
// invalid
$def = $this->dsnMap['Local'];
$this->setExpectedException('mychaelstyle\\Exception');
$provider = $this->object->getProvider('', $def['options']);
}
开发者ID:mychaelstyle,项目名称:php-utils,代码行数:13,代码来源:FactoryTest.php
示例7: testArr
public function testArr()
{
$data = ["a" => "b"];
$provider = new Provider($data);
$this->assertEquals($data, $provider->getDataAsArray());
$this->assertEquals($data, $provider->exportFromArray($data));
}
开发者ID:alex-k,项目名称:jsondiff,代码行数:7,代码来源:Arr.phpTest.php
示例8: add
/**
* [add description]
*
* @param Provider $provider [description]
*
* @return [type] [description]
*/
public function add(Provider $provider)
{
$provider->setApplication($this->app);
$providerName = get_class($provider);
if (!isset($this->providers[$providerName])) {
$this->providers[$providerName] = $provider;
}
}
开发者ID:xinix-technology,项目名称:bono,代码行数:15,代码来源:ProviderRepository.php
示例9: test_get_user_details_throws_exception_if_user_rejects_application
/**
* @expectedException AdamWathan\EloquentOAuth\Exceptions\ApplicationRejectedException
*/
public function test_get_user_details_throws_exception_if_user_rejects_application()
{
$redirectUri = 'http://myapp.dev/provider/login';
$config = array('id' => '1', 'secret' => 'foobar', 'redirect' => $redirectUri);
$httpClient = M::mock('GuzzleHttp\\Client')->shouldIgnoreMissing();
$input = M::mock('Illuminate\\Http\\Request')->shouldIgnoreMissing();
$provider = new Provider($config, $httpClient, $input);
$httpClient->shouldReceive('post->getBody')->andReturn('abc123');
$httpClient->shouldReceive('get->getBody')->andReturn('{"user_id":"1","nick_name":"john.doe","first_name":"John","last_name":"Doe","email":"[email protected]","photo":"http:\\/\\/example.com\\/photos\\/john_doe.jpg"}');
$input->shouldReceive('has')->andReturn(false);
$details = $provider->getUserDetails();
}
开发者ID:kimnv57,项目名称:laravel-simple-api-ueter-aide,代码行数:15,代码来源:ProviderTest.php
示例10: proceduresAction
public function proceduresAction()
{
$visitId = (int) $this->_getParam('visitId');
$visit = new Visit();
$visit->visitId = $visitId;
if ($visitId > 0) {
$visit->populate();
}
$provider = new Provider();
$providerIterator = $provider->getIter();
$this->view->listProviders = $providerIterator->toArray('personId', 'displayName');
$this->view->providerId = (int) $visit->providerId;
$this->render();
}
开发者ID:dragonlet,项目名称:clearhealth,代码行数:14,代码来源:VisitSelectController.php
示例11: getInstance
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new Provider();
}
return self::$instance;
}
开发者ID:longceng,项目名称:honingwon,代码行数:7,代码来源:Provider.php
示例12: editAction
public function editAction()
{
$personId = (int) $this->_getParam('personId');
if (isset($this->_session->messages)) {
$this->view->messages = $this->_session->messages;
}
$this->_form = new WebVista_Form(array('name' => 'provider-detail'));
$this->_form->setAction(Zend_Registry::get('baseUrl') . "admin-providers.raw/edit-process");
$this->_provider = new Provider();
$this->_provider->person_id = $personId;
if (!$this->_provider->populate()) {
if ($personId > 0) {
//handle case where person exists but no provider record
$this->view->noProvider = true;
}
//do nothing if personId is 0, no person selected yet
}
$this->_form->loadORM($this->_provider, 'provider');
//var_dump($this->_form);
$this->view->form = $this->_form;
$this->view->person = $this->_provider;
$stations = Enumeration::getEnumArray(Routing::ENUM_PARENT_NAME);
$stations = array_merge(array('' => ''), $stations);
$this->view->stations = $stations;
$specialties = array('' => '');
$listSpecialties = Provider::getListSpecialties();
// temporarily use AM = American Medical Association
foreach ($listSpecialties['AM'] as $specialty) {
$specialties[$specialty['code']] = $specialty['description'];
}
$this->view->specialties = $specialties;
$this->view->colors = Room::getColorList();
$this->render('edit');
}
开发者ID:dragonlet,项目名称:clearhealth,代码行数:34,代码来源:AdminProvidersController.php
示例13: getProductsData
/**
* Get products data
*
* @return array
*/
public function getProductsData()
{
$productsData = [];
$provider = new Provider();
foreach ($this->_brands as $brandId => $brand) {
$categoryUrl = $provider->getCategoryUrl(self::STORE_URL, $brandId, self::ALL_CATEGORY_PRODUCTS);
if ($categoryUrl) {
$productUrls[$categoryUrl] = $provider->getProductUrls($this->_addStoreUrl($categoryUrl));
foreach ($productUrls[$categoryUrl] as $index => $productUrl) {
$productData = $provider->getProductData($this->_addStoreUrl($productUrl));
$productsData[$productUrl] = $this->_addBrandToProductData($productData, $brand);
}
}
}
return $productsData;
}
开发者ID:VaD1ke,项目名称:letual_parse,代码行数:21,代码来源:Getter.php
示例14: __Construct
function __Construct($dictionary)
{
parent::__Construct(get_class(), "desktop.html", $dictionary);
//get input params
$paymentConfigCode = Params::Get('state');
$authCode = Params::Get('code');
//load provider (verify code)
$provider = Provider::FromPaymentConfigCode($paymentConfigCode);
if (is_null($provider)) {
//TODO: deal with this
} else {
//check stripe id isn't already set
if (!is_null($provider->getStripeAccountId())) {
//TODO: deal with this
} else {
$stripeAccount = StripeConnector::ConstructAccount($authCode);
if (is_null($stripeAccount)) {
//TODO: deal with this
} else {
//add to provider - clear code
$provider->setStripeAccountId($stripeAccount->getId());
$provider->setPaymentConfigCode(null);
$provider->save();
//notify success
$this->connected = true;
}
}
}
}
开发者ID:TreatNOW,项目名称:TNfrontend,代码行数:29,代码来源:StripeReturnPage.inc.php
示例15: getProviderName
public function getProviderName($provider_id)
{
$provider = Provider::model()->findByPk($provider_id);
if ($provider) {
return $provider->provider_name;
}
return 'Medlatec';
}
开发者ID:huynt57,项目名称:medlatec,代码行数:8,代码来源:Provider.php
示例16: indexAjax
public function indexAjax()
{
return BootstrapUI::tableRemoteResponse()->search(array('name'))->column('name')->column('total', function ($value, $row) {
return "<div class=\"text-right\">{$value}</div>";
})->column('action', function ($value, $row) {
return \Bootstrap::anchor(\Bootstrap::icon('search'), \Koldy\Url::href('reports', 'search', array('provider_id' => $row['id'])))->title('Find reports sent from this provider')->asButton()->size('xs')->color('red');
})->resultSet(Provider::resultSet())->handle();
}
开发者ID:nkammah,项目名称:Crash-Analytics,代码行数:8,代码来源:ProvidersController.php
示例17: actionGetAllResult
public function actionGetAllResult()
{
$columns = array(0 => 'id', 1 => 'patient_name', 2 => 'service', 3 => 'time', 4 => 'status', 5 => 'created_at', 6 => 'action');
$request = Yii::app()->request;
$start = $_REQUEST['start'];
$length = $_REQUEST['length'];
$column = $_REQUEST['order'][0]['column'];
$order = $_REQUEST['order'][0]['dir'];
$where = null;
$criteria = new CDbCriteria();
$criteria->order = "{$columns[$column]} {$order}";
if (!empty($_REQUEST['search']['value'])) {
$criteria->addSearchCondition("patient_name", $_REQUEST['search']['value'], 'true', 'OR');
$criteria->addSearchCondition("service", $_REQUEST['search']['value'], 'true', 'OR');
$criteria->addSearchCondition("time", $_REQUEST['search']['value'], 'true', 'OR');
$criteria->addSearchCondition("status", $_REQUEST['search']['value'], 'true', 'OR');
$where = true;
}
if (!empty(Yii::app()->session['provider_id'])) {
$criteria->condition = "status >= 1 AND provider_id = " . Yii::app()->session['provider_id'];
}
$count = ResultMedlatec::model()->count($criteria);
$criteria->limit = $length;
$criteria->offset = $start;
// $criteria->condition = "provider_id = " . Yii::app()->session['provider_id'];
$data = ResultMedlatec::model()->findAll($criteria);
$returnArr = array();
$service_name = null;
$patient_name = null;
foreach ($data as $item) {
$order = OrderMedlatec::model()->findByPk($item->order_id);
if ($order) {
$service = ServiceMedlatec::model()->findByPk($order->service_id);
if ($service) {
$service_name = $service->service_name;
}
$patient_name = $order->name;
}
$itemArr = array();
$itemArr['id'] = $item->id;
$itemArr['patient_name'] = $patient_name;
$itemArr['service'] = $service_name;
$itemArr['time'] = Date('d-m-Y', $item->time);
$itemArr['status'] = Util::getStatusLabel($item->status);
$itemArr['created_at'] = Date('d-m-Y', $item->created_at);
if (empty(Yii::app()->session['provider_id'])) {
$itemArr['provider_name'] = Provider::model()->getProviderName($item->provider_id);
}
$edit_url = Yii::app()->createUrl('result/edit', array('result_id' => $item->id));
$order_url = Yii::app()->createUrl('result/order', array('oid' => $item->order_id));
$action = '<a data-toggle="modal" href="' . $edit_url . '" data-target="#edit-order-modal" onclick="loadInfoResult(' . $item->id . ')"><span class="label label-primary">Sửa</span></a>';
$action .= ' <a data-toggle="modal" href="' . $order_url . '" data-target="#edit-order-modal" onclick="loadInfo(' . $item->order_id . ')"><span class="label label-info">Xem order</span></a>';
$itemArr['action'] = $action;
$returnArr[] = $itemArr;
}
//$all = ResultMedlatec::model()->findAll();
echo json_encode(array('data' => $returnArr, "recordsTotal" => $count, "recordsFiltered" => count($data)));
}
开发者ID:huynt57,项目名称:medlatec,代码行数:58,代码来源:ResultController.php
示例18: load
/**
* Load the dictionary that match the prefered languages.
*
* @return array The associative array of dictionary
* @throws CantLoadDictionaryException Thrown when there is no match between languages files and selected languages.
*/
public function load()
{
$this->dictProvider->setLangsPath($this->path);
$dict = $this->dictProvider->load($this->getAvailableLangs());
if ($dict === null) {
throw new CantLoadDictionaryException(CantLoadDictionaryException::NO_MATCHING_FILES);
}
return $dict;
}
开发者ID:PaulRieger,项目名称:o80-i18n,代码行数:15,代码来源:I18N.php
示例19: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
Sms::create(['provider_id' => '1', 'name' => 'auth_key']);
Sms::create(['provider_id' => '1', 'name' => 'sender_id']);
Sms::create(['provider_id' => '1', 'name' => 'route']);
Provider::create(array('name' => 'Msg91.com'));
// $this->call("OthersTableSeeder");
}
开发者ID:vijaysebastian,项目名称:sms,代码行数:14,代码来源:FaveoSmsDatabaseSeeder.php
示例20: create
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
if (!check_admin_auth()) {
return Redirect::action('SessionsController@create');
}
$role = check_admin_auth();
$companies = Company::get(['id', 'fancy_name']);
$providers = Provider::get(['id', 'fancy_name']);
return View::make('registrations.create', compact('role', 'providers', 'companies'));
}
开发者ID:hilmysyarif,项目名称:erp,代码行数:15,代码来源:AdminsUserController.php
注:本文中的Provider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论