本文整理汇总了PHP中Contacts::getContacts方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::getContacts方法的具体用法?PHP Contacts::getContacts怎么用?PHP Contacts::getContacts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contacts
的用法示例。
在下文中一共展示了Contacts::getContacts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
<?php
require_once "../lib/model/Contacts.php";
require_once "../lib/model/Locations.php";
require_once "../lib/model/Venues.php";
require_once "../lib/model/Users.php";
require_once "../lib/model/Suggestions.php";
$app->get('/api/contacts/', function () {
$cn = new Contacts();
$cn->getContacts();
});
$app->post('/api/contacts/', function () use($app) {
$req = $app->request();
$bdy = $req->getBody();
$contact = json_decode($bdy);
$cn = new Contacts();
$cn->insertContact($contact[0]);
});
$app->get('/api/contacts/:id', function ($id) {
$cn = new Contacts();
$cn->getContactsById($id);
});
$app->put('/api/contacts/:id', function ($id) use($app) {
$req = $app->request();
$bdy = $req->getBody();
$contact = json_decode($bdy);
$cn = new Contacts();
$cn->updateContact($id, $contact[0]);
});
$app->delete('/api/contacts/:id', function ($id) {
$cn = new Contacts();
示例2: contactsGrid
/**
* contactsGrid
* Get all the contacts of the customer
* @return unknown_type
*/
private function contactsGrid($customer_id)
{
if (is_numeric($customer_id)) {
$rs = Contacts::getContacts($customer_id);
if (isset($rs)) {
return array('records' => $rs, 'delete' => array('controller' => 'profile', 'action' => 'deletecontact'));
}
}
}
示例3: indexAction
/** Display the index page
*/
public function indexAction()
{
$contacts = new Contacts();
$this->view->contacts = $contacts->getContacts($this->_getParam('page'));
}
示例4: contactsGrid
private function contactsGrid()
{
$request = Zend_Controller_Front::getInstance()->getRequest();
if (isset($request->id) && is_numeric($request->id)) {
$rs = Contacts::getContacts($request->id);
if (isset($rs)) {
$columns[] = $this->translator->translate('Contacts');
$columns[] = $this->translator->translate('Type');
return array('name' => 'contacts', 'columns' => $columns, 'records' => $rs, 'delete' => array('controller' => 'customers', 'action' => 'deletecontact'));
}
}
}