本文整理汇总了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'))));
}