本文整理匯總了PHP中DataProvider::get_providers方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataProvider::get_providers方法的具體用法?PHP DataProvider::get_providers怎麽用?PHP DataProvider::get_providers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DataProvider
的用法示例。
在下文中一共展示了DataProvider::get_providers方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAllProviders
/**
* Get all enabled providers, with their configuration data.
* @return Array
*/
protected function getAllProviders($enabled = false)
{
if ($enabled) {
// Returns all *enabled* providers.
return \DataProvider::get_enabled_providers();
} else {
// Returns all providers, even if they are disabled.
return \DataProvider::get_providers();
}
}
示例2: getRules
protected function getRules()
{
return ['user_id' => [[[$this->user_repo, 'exists'], [':value']]], 'type' => [['not_empty'], ['max_length', [':value', 255]], ['in_array', [':value', [Contact::EMAIL, Contact::PHONE, Contact::TWITTER]]]], 'data_provider' => [['in_array', [':value', array_keys(\DataProvider::get_providers())]]], 'contact' => [['not_empty'], ['max_length', [':value', 255]], [[$this, 'valid_contact'], [':value', ':data', ':validation']]]];
}
示例3: getRules
protected function getRules()
{
return ['direction' => [['not_empty'], ['in_array', [':value', [\Message_Direction::INCOMING]]]], 'message' => [['not_empty']], 'datetime' => [['date']], 'type' => [['not_empty'], ['max_length', [':value', 255]], ['in_array', [':value', ['sms', 'ivr', 'email', 'twitter']]]], 'data_provider' => [['in_array', [':value', array_keys(\DataProvider::get_providers())]]], 'data_provider_message_id' => [['max_length', [':value', 511]]], 'status' => [['not_empty'], ['in_array', [':value', [\Message_Status::RECEIVED]]]], 'parent_id' => [['numeric'], [[$this->repo, 'parentExists'], [':value']]], 'post_id' => [['numeric']], 'contact_id' => [['numeric']]];
}
示例4: rules
/**
* Rules for the tag model
*
* @return array Rules
*/
public function rules()
{
return array('id' => array(array('numeric')), 'user_id' => array(array('numeric'), array(array($this, 'fk_exists'), array('User', ':field', ':value'))), 'data_provider' => array(array('array_key_exists', array(':value', DataProvider::get_providers()))), 'type' => array(array('not_empty'), array('in_array', array(':value', array(self::EMAIL, self::PHONE, self::TWITTER)))), 'contact' => array(array('not_empty'), array('max_length', array(':value', 255)), array(array($this, 'valid_contact'), array(':validation', ':field'))));
}
示例5: rules
/**
* Rules for the tag model
*
* @return array Rules
*/
public function rules()
{
return array('id' => array(array('numeric')), 'title' => array(array(array($this, 'valid_title'), array(':validation', ':field'))), 'message' => array(array('not_empty')), 'datetime' => array(array('date')), 'type' => array(array('not_empty'), array('max_length', array(':value', 255)), array('in_array', array(':value', array('sms', 'email', 'twitter')))), 'data_provider' => array(array('array_key_exists', array(':value', DataProvider::get_providers()))), 'data_provider_message_id' => array(array('max_length', array(':value', 511))), 'status' => array(array('not_empty'), array('in_array', array(':value', array(Message_Status::PENDING, Message_Status::PENDING_POLL, Message_Status::RECEIVED, Message_Status::EXPIRED, Message_Status::CANCELLED, Message_Status::FAILED, Message_Status::UNKNOWN, Message_Status::SENT))), array(array($this, 'valid_status'), array(':value', ':original_values'))), 'direction' => array(array('not_empty'), array('in_array', array(':value', array(Message_Direction::INCOMING, Message_Direction::OUTGOING))), array(array($this, 'valid_direction'), array(':field', ':value', ':original_values'))), 'parent_id' => array(array('numeric'), array(array($this, 'parent_exists'), array(':field', ':value'))), 'post_id' => array(array('numeric'), array(array($this, 'fk_exists'), array('Post', ':field', ':value'))), 'contact_id' => array(array('numeric'), array(array($this, 'fk_exists'), array('Contact', ':field', ':value'))));
}