本文整理汇总了PHP中unknown::get方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::get方法的具体用法?PHP unknown::get怎么用?PHP unknown::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initialize model for person model
* @param Document $csvDocument csv document
* @param unknown $authData auth xml
* @param unknown $duplicateHandle how to manage duplicate
* @param unknown $lang lang
* @param unknown $serviceManager tags
* @return void
*/
public function __construct($csvDocument, $authData, $duplicateHandle, $lang, $serviceManager)
{
$this->personModel = $serviceManager->get('MoveIn4Person\\Model\\Person');
$this->referenceModel = $serviceManager->get('MoveIn4ReferenceList\\Model\\ReferenceList');
//$this->customAttributeModel = $serviceManager->get('MoveIn4CustomAttribute\Document\CustomAttributeDocument');
//$this->customListItemModel = $serviceManager->get('\MoveIn4CustomList\Document\CustomListItemDocument');
$this->dm = $serviceManager;
$this->language = $lang;
$this->authData = $authData;
$this->duplicateHandle = $duplicateHandle;
$this->csvDocument = $csvDocument;
}
示例2: __construct
/**
* Cart constructor
*
* @param StorageInterface $store The interface for storing the cart data
* @param IdentifierInterface $identifier The interface for storing the identifier
*/
public function __construct(StorageInterface $store, IdentifierInterface $identifier)
{
$this->store = $store;
$this->identifier = $identifier;
// Generate/retrieve identifier
$this->id = $this->identifier->get();
// Restore the cart from a saved version
if (method_exists($this->store, 'restore')) {
$this->store->restore($this->id);
}
// Let our storage class know which cart we're talking about
$this->store->setIdentifier($this->id);
}
示例3: paginate
/**
* Paginate the given criteria
* @param Builder $criteria
* @param unknown $columns
* @return \App\Core\PaginatorCore
*/
public function paginate($criteria, $columns = ['*'])
{
if ($criteria instanceof Illuminate\Database\Eloquent\Builder) {
$builder = $criteria->getQuery();
} else {
$builder = $criteria;
}
$pageName = 'page';
$sortColumn = '';
$sortOrder = '';
$default = config('system.page_limit');
$total = $builder->getCountForPagination();
if (!is_null($this->request) && $this->request->has('page_limit')) {
$perPage = $this->request->has('page_limit') ? $this->request->get('page_limit') : $default;
$page = $this->request->has($pageName) ? $this->request->get($pageName) : null;
$sortColumn = $this->request->has('sort') ? $this->request->get('sort') : '';
$sortOrder = $this->request->has('order') ? $this->request->get('order') : '';
} else {
$perPage = $default;
}
$builder->forPage($page = Paginator::resolveCurrentPage($pageName), $perPage);
if ($sortColumn) {
$sortOrder = $sortOrder ? $sortOrder : $this->defaultSort;
$criteria = $builder->orderBy($sortColumn, $sortOrder);
}
return new PaginatorCore($builder->get($columns), $total, $perPage, $page, ['path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, 'sortColumn' => $sortColumn, 'sortOrder' => $sortOrder]);
}
示例4: report
/**
* undocumented function
*
* @return void
* @access public
*/
function report($conditions = array(), $returnRaw = false)
{
if (!$this->connected() && !$this->login()) {
return false;
}
if (is_int($conditions)) {
$conditions = array('profile' => $conditions);
} elseif (is_string($conditions)) {
$conditions = array('report' => $conditions);
}
$defaults = array('profile' => null, 'report' => 'Dashboard', 'from' => date('Y-m-d', time() - 1 * MONTH), 'to' => date('Y-m-d'), 'query' => array(), 'tab' => 0, 'format' => 'xml', 'compute' => 'average', 'view' => 0);
$conditions = am($defaults, $conditions);
$formats = array('pdf' => 0, 'xml' => 1, 'csv' => 2, 'tsv' => 3);
foreach (array('from', 'to') as $condition) {
if (is_string($conditions[$condition])) {
$conditions[$condition] = strtotime($conditions[$condition]);
}
}
$conditions['profile'] = $this->profileId($conditions['profile']);
$query = array('fmt' => isset($formats[$conditions['format']]) ? $formats[$conditions['format']] : $conditions['format'], 'id' => $conditions['profile'], 'pdr' => date('Ymd', $conditions['from']) . '-' . date('Ymd', $conditions['to']), 'tab' => $conditions['tab'], 'cmp' => $conditions['compute'], 'view' => $conditions['view'], 'rpt' => $conditions['report'] . 'Report');
$query = am($query, $conditions['query']);
$report = $this->Http->get('https://www.google.com/analytics/reporting/export', $query);
if ($returnRaw == true || $query['fmt'] != 1) {
return $report;
}
uses('Xml');
$ReportXml =& new XML($report);
return $this->xmltoArray($ReportXml);
}
示例5: sign
/**
* 数据签名
* @param unknown $data
* @return string
*/
function sign($data)
{
$data = $this->filterParameter($data);
ksort($data);
reset($data);
$str = $this->toString($data) . '&key=' . $this->_system->get('key', 'weixin');
$str = strtoupper(md5($str));
return $str;
}
示例6: getRoute
/**
* @todo wrong integration when using cli application!
*
* @param unknown $request
*
* @return unknown
*/
public function getRoute($request)
{
if ($this->rewriteEnabled) {
$route = $request->getRequestPathSuffix();
} else {
$route = $request->get('route', false);
}
return $route;
}
示例7: clear
/**
* Clear data filter from session
* @param string $key
*/
protected function clear($key = '')
{
$data = $this->session->get('filters');
if ($this->request->has('clear_filter')) {
if (isset($data[$this->request->getPathInfo()])) {
$this->session->set('filters.' . $this->request->getPathInfo(), '');
}
} elseif ($key) {
if (isset($data[$this->request->getPathInfo()][$key])) {
unset($data[$this->request->getPathInfo()][$key]);
$this->session->set('filters', $data);
}
}
}
示例8: sign
/**
* 参数加密
* @param unknown $parameter
* @return string
*/
function sign($parameter, $sign_type = '')
{
$parameter = $this->toString($parameter) . $this->_system->get('key', 'alipay');
$sign_type = trim(strtoupper(empty($sign_type) ? $this->_config['sign_type'] : $sign_type));
switch ($sign_type) {
case 'MD5':
$parameter = md5($parameter);
break;
case 'RSA':
$private_key = $this->_system->get('rsaprivatekey', 'alipay');
return $this->encryptRSA($parameter, $private_key);
break;
case 'DSA':
break;
default:
break;
}
return $parameter;
}
示例9: getIdentityResult
/**
*
* @param unknown $sl
*/
public function getIdentityResult($sl)
{
$user = $sl->get('User\\Identity');
return $user->userIdentityInstance($this->user['id']);
}
示例10: orbis_tasks_pre_get_posts
/**
* Defaults
* @param unknown $query
*/
function orbis_tasks_pre_get_posts($query)
{
$post_type = $query->get('post_type');
if ('orbis_task' == $post_type) {
// Order
$orderby = $query->get('orderby');
$order = $query->get('order');
if (empty($orderby)) {
// Default = Due At
$query->set('orderby', 'orbis_task_due_at');
if (empty($order)) {
if (is_admin()) {
// Default = Descending
$query->set('order', 'DESC');
} else {
// Default = Ascending
$query->set('order', 'ASC');
}
}
}
// Completed
if ($query->is_post_type_archive('orbis_task') && !is_admin()) {
$completed = $query->get('orbis_task_completed');
if (empty($completed)) {
// Default = Not completed
$query->set('orbis_task_completed', 'no');
}
}
}
}
示例11: get
/**
* 获取memcache缓存项
* @see Star_Cache_Interface::get()
*/
public function get($key)
{
return $this->memcache->get($key);
}
示例12: authentication
/**
*
* @param unknown $poIdentity
* @param unknown $psUrlFrom
*/
public function authentication($poAuthService, $poIdentity, $psUrlFrom = null, $poForm = null, $psType = 'onion')
{
$lsStatus = null;
if ($poIdentity->getActive() == 1) {
$laUserContext = null;
if ($poIdentity->get('stIpContext') !== null) {
$lsUserAgent = '*';
if ($poIdentity->get('stUserAgent') !== null) {
$lsUserAgent = $poIdentity->get('stUserAgent');
}
$laUserContext = array($poIdentity->get('stIpContext') => array('denied' => $poIdentity->get('isContextDenied'), $lsUserAgent => $poIdentity->get('stRegistrationToken')));
}
if (Context::hasContextAccess($laUserContext)) {
$loSession = new Session();
$loSession->clearRegister('OnionAuth');
$loSession->clearRegister('storage', 'Zend_Auth');
$poIdentity->getObject();
$poIdentity->set('stPassword', 'nono');
$poIdentity->set('stPasswordSalt', '');
$poIdentity->set('stAnswer', '');
$loSession->setRegister('OnionAuth', $poIdentity);
$loIdentity = $loSession->getRegister('OnionAuth');
$poAuthService->getStorage()->write($poIdentity);
if ($poForm->get('rememberme')->getValue() == 1) {
$laOptions = Config::getAppOptions('settings');
$loSessionManager = new SessionManager();
$loSessionManager->rememberMe($laOptions['sessionLifeTime']);
}
Debug::debug($poIdentity->getUsername() . " [SUCCESS by {$psType}]");
Access::log($poIdentity, "SUCCESS by " . $psType);
if ($psUrlFrom !== null) {
if ('/' !== $psUrlFrom) {
$psUrlFrom = base64_decode($psUrlFrom);
}
Debug::debug("Redirect to: ({$psUrlFrom})");
$this->redirect()->toUrl($psUrlFrom);
}
} else {
$poForm->get('stUsername')->setMessages(array("Permissão negada para o contexto de acesso!"));
$lsStatus = "CONTEXT DENIED";
}
} else {
$poForm->get('stUsername')->setMessages(array("Usuário desativado!"));
$lsStatus = "USER DISABLED";
}
return $lsStatus;
}
示例13: setBehaviourRequestFormParams
/**
* Set behaviour parameters where required based on the type if request received
* @param unknown $objBehaviour
* @return array
*/
private function setBehaviourRequestFormParams($objBehaviour)
{
$arr_params = array('behaviour' => $objBehaviour->get('behaviour'), 'beh_action' => $objBehaviour->get('action'));
//set additional params based on behaviour and its action where applicable
switch (strtolower(str_replace("_", "", $arr_params['behaviour']))) {
case "formfields":
$arr_params['form_id'] = $objBehaviour->get('fk_form_id');
$arr_params['field_id'] = $objBehaviour->get('fk_fields_all_id');
break;
}
//end switch
return $arr_params;
}
示例14: get
/**
* 获取redis缓存项
*/
public function get($key)
{
return $this->redis->get($key);
}
示例15: orbis_deals_pre_get_posts
/**
* Defaults
* @param unknown $query
*/
function orbis_deals_pre_get_posts($query)
{
$post_type = $query->get('post_type');
if ('orbis_deal' == $post_type) {
// Status
$status = $query->get('orbis_deal_status');
if ($status) {
$meta_query = $query->get('meta_query');
if (!is_array($meta_query)) {
$meta_query = array();
}
$meta_query[] = array('key' => '_orbis_deal_status', 'value' => $status);
$query->set('meta_query', $meta_query);
}
}
}