当前位置: 首页>>代码示例>>PHP>>正文


PHP forward_static_call_array函数代码示例

本文整理汇总了PHP中forward_static_call_array函数的典型用法代码示例。如果您正苦于以下问题:PHP forward_static_call_array函数的具体用法?PHP forward_static_call_array怎么用?PHP forward_static_call_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了forward_static_call_array函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: findBy

 /**
  * {@inheritdoc}
  * @return Model
  */
 public function findBy(array $where = [])
 {
     if ($where === []) {
         return forward_static_call_array([get_class($this->getEloquentModel()), 'all']);
     }
     return forward_static_call_array([get_class($this->getEloquentModel()), 'where'], $where);
 }
开发者ID:blackskyliner,项目名称:leaugefw,代码行数:11,代码来源:EloquentManager.php

示例2: __callStatic

 public static function __callStatic($name, $arguments)
 {
     echo "{$name}(" . implode(', ', $arguments) . ") = ";
     $ret = forward_static_call_array($name, $arguments);
     echo print_r($ret, true) . "\n";
     return $ret;
 }
开发者ID:bramp,项目名称:protoc-gen-php,代码行数:7,代码来源:phpunit_base.php

示例3: details

 public static function details($_model = null)
 {
     $module = static::$module;
     $modeler = $module::model()->modeler;
     $_model = $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : forward_static_call_array(array($modeler, 'model'), array($_model));
     $_o = (object) null;
     $_o->size = 'large';
     $_o->icon_type = 'menu-icon';
     $_o->icon_background = 'atom-icon-background';
     $_o->menu = (object) null;
     $_o->menu->items = self::modelOperationsMenuItems();
     $_o->head = 'Package Details';
     $_o->body = array('');
     $_o->body[] = (object) array('js' => 'registry.setContext({card:\'cards/package/details\',collection:\'packages\',node:\'' . $_model->id . '\'});');
     $_o->body[] = CardKitHTML::sublineBlock('Name');
     $_o->body[] = DOMElementKitJS::loadComponentHere(DOMElementKitJS::xhrCallObject('forms/package/name', array($_model->id)), $_model->name, 'settings');
     $_o->body[] = CardKitHTML::sublineBlock('Package Sequode');
     $_o->body[] = $_model->sequode_id != 0 && \Sequode\Application\Modules\Sequode\Modeler::exists($_model->sequode_id, 'id') ? DOMElementKitJS::loadComponentHere(DOMElementKitJS::xhrCallObject('forms/package/packageSequode', array($_model->id)), \Sequode\Application\Modules\Sequode\Modeler::model()->name, 'settings') : ModuleForm::render(static::$registry_key, 'packageSequode')[0];
     $_o->body[] = CardKitHTML::sublineBlock('Package Token');
     $_o->body[] = $_model->token;
     $_o->body[] = CardKitHTML::sublineBlock('<a target="_blank" href="/source/' . $_model->token . '">Download</a>');
     $_o->body[] = CardKit::nextInCollection((object) array('model_id' => $_model->id, 'details_route' => 'cards/package/details'));
     if (\Sequode\Application\Modules\Account\Authority::isSystemOwner()) {
         $_o->body[] = CardKitHTML::modelId($_model);
     }
     return $_o;
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:27,代码来源:Cards.class.php

示例4: instance

 /**
  * Returns the implementation implementation registered with the Facade.
  *
  * @return Xaamin\Whatsapi\Contracts\WhatsapiInterface
  */
 public static function instance()
 {
     if (!static::$instance) {
         static::$instance = forward_static_call_array(array(get_called_class(), 'create'), func_get_args());
     }
     return static::$instance;
 }
开发者ID:shinichi81,项目名称:whatsapi-1,代码行数:12,代码来源:Facade.php

示例5: updateLastSignIn

 public static function updateLastSignIn($time = false, $_model = null)
 {
     $modeler = static::$modeler;
     $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : forward_static_call_array(array($modeler, 'model'), array($_model));
     $modeler::model()->updateField($time === false ? time() : $time, 'last_sign_in');
     return $modeler::model();
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:7,代码来源:ORMModelSetLastSignInTrait.class.php

示例6: delete

 public static function delete($_model = null)
 {
     $modeler = static::$modeler;
     $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : forward_static_call_array(array($modeler, 'model'), array($_model));
     $modeler::model()->delete($modeler::model()->id);
     return $modeler::model();
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:7,代码来源:ORMModelDeleteTrait.class.php

示例7: instance

 /**
  * Returns the Sentry instance registered with the Facade.
  *
  * @return \Cartalyst\Sentry\Sentry
  */
 public static function instance()
 {
     if (static::$instance === null) {
         static::$instance = forward_static_call_array([get_called_class(), 'createSentry'], func_get_args());
     }
     return static::$instance;
 }
开发者ID:ssomenzi,项目名称:silence,代码行数:12,代码来源:Facade.php

示例8: actionWorker

 /**
  * 处理一个Worker
  * @param string $q queue name
  */
 public function actionWorker($q = "default")
 {
     $retried_at = date('Y-m-d H:i:s');
     $queue = Yii::createObject(['class' => 'wh\\asynctask\\Queue', 'redis' => $this->module->redis]);
     /** @var $identity string */
     $identity = $queue->getWorkerIdentity();
     $logPath = $this->module->getWorkerLogPath();
     FileHelper::createDirectory($logPath);
     $currentDate = date('Y-m-d');
     FileHelper::createDirectory($logPath . '/' . $currentDate);
     $logStderr = "{$logPath}/{$currentDate}/{$q}.stderr.log";
     $data = $queue->pop($q);
     if (!is_null($data)) {
         try {
             $queue->setWorkerStart($identity, $data);
             $this->setProcessTitle($this->module->id . '/worker ' . $data['class'] . ':run(' . implode(', ', $data['args']) . ')');
             forward_static_call_array([$data['class'], 'run'], $data['args']);
         } catch (\Exception $e) {
             if ($data['retry'] && (!isset($data['retry_count']) || $data['retry_count'] < $this->processMaxRetries)) {
                 $queue->setStat(false);
                 $realCommand = sprintf('echo "%s">>%s &', $e->getMessage(), $logStderr);
                 exec($realCommand);
                 $queue->setRetry(['retry' => $data['retry'], 'class' => $data['class'], 'args' => $data['args'], 'enqueued_at' => $data['enqueued_at'], 'error_message' => $e->getMessage(), 'failed_at' => date('Y-m-d H:i:s'), 'job_id' => $data['job_id'], 'queue' => $data['queue'], 'retried_at' => isset($data['retried_at']) ? $retried_at : date('Y-m-d H:i:s'), 'retry_count' => isset($data['retry_count']) ? intval($data['retry_count']) + 1 : 0]);
             }
         }
         $queue->setStat();
         $queue->setWorkerEnd($identity);
     }
 }
开发者ID:wayhood,项目名称:yii2-asynctask,代码行数:33,代码来源:AsyncTaskController.php

示例9: updatePassword

 public static function updatePassword($password, $_model = null)
 {
     $modeler = static::$modeler;
     $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : forward_static_call_array(array($modeler, 'model'), array($_model));
     $modeler::model()->updateField(Hashes::generateHash($password), 'password');
     return $modeler::model();
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:7,代码来源:ORMModelSetPasswordTrait.class.php

示例10: packageSequode

 public static function packageSequode($_model = null, $user_model = null)
 {
     $module = static::$module;
     $modeler = $module::model()->modeler;
     $_model = $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : $_model;
     $_user_model = $_user_model == null ? \Sequode\Application\Modules\Account\Modeler::model() : $_user_model;
     $_o = (object) null;
     $values = $where = array();
     $values[] = '{\'value\':\'0\',\'printable\':\'Select Package Sequode\'}';
     $sequodes_model = new \Sequode\Application\Modules\Sequode\Modeler::$model();
     /*
     $where[] = array('field'=>'owner_id','operator'=>'=','value'=>5);
     $where[] = array('field'=>'shared','operator'=>'=','value'=>1);
     $where[] = array('field'=>'package','operator'=>'=','value'=>1);
     $sequodes_model->getAll($where);
     foreach( $sequodes_model->all as $object){
         $values[] = '{\'value\':\''.$object->id.'\',\'printable\':\''.$object->name.'\'}';
     }
     */
     $where = array();
     $where[] = array('field' => 'owner_id', 'operator' => '=', 'value' => $_user_model->id);
     $where[] = array('field' => 'package', 'operator' => '=', 'value' => 1);
     $sequodes_model->getAll($where);
     foreach ($sequodes_model->all as $object) {
         $values[] = '{\'value\':\'' . $object->id . '\',\'printable\':\'' . $object->name . '\'}';
     }
     FormInputModeler::exists('select', 'name');
     $_o->sequode = json_decode(FormInputModeler::model()->component_object);
     $_o->sequode->Label = '';
     $_o->sequode->Values = '[' . implode(',', $values) . ']';
     $_o->sequode->Value = $_model->sequode_id;
     $_o->sequode->Value_Key = 'value';
     $_o->sequode->Printable_Key = 'printable';
     return $_o;
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:35,代码来源:FormInputs.class.php

示例11: collections

 public static function collections($collection = 'collections', $key = null)
 {
     $module = static::$module;
     if ($collection == 'collections' && isset($module::model()->assets->boot_collections)) {
         $collections = $module::model()->assets->boot_collections;
         echo '{';
         echo "\n";
         foreach ($collections as $loop_key => $collection) {
             if ($loop_key != 0) {
                 echo ",\n";
             }
             echo '"' . $collection . '":';
             echo self::collections($collection);
         }
         echo "\n";
         echo '}';
         return;
     }
     $modules = ModuleRegistry::modules();
     foreach ($modules as $module) {
         if (!empty($module::model()->collections)) {
             if (isset($collection) && in_array($collection, ApplicationRoutes::routes($module::model()->collections))) {
                 forward_static_call_array(array($module::model()->collections, ApplicationRoutes::route($module::model()->collections, $collection)), $key != null ? array($key) : array());
                 return;
             }
         }
     }
     return;
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:29,代码来源:CollectionsTrait.class.php

示例12: dispatch

 /**
  * Closure metódusok futtatása, vagy controller objektumok példányosítása és action futtatása
  */
 public function dispatch($data_array)
 {
     foreach ($data_array as $key => $value) {
         if (isset($value['closure']) && is_callable($value['closure'])) {
             call_user_func_array($value['closure'], $value['params']);
         } elseif (isset($value['controller'])) {
             $this->controller = $value['controller'];
             $this->action = $value['action'];
             $this->params = $value['named_params'];
             $controller_class = $this->controller_namespace . ucfirst($value['controller']);
             if (class_exists($controller_class)) {
                 // first check if is a static method, directly trying to invoke it. if isn't a valid static method, we will try as a normal method invocation.
                 if (call_user_func_array(array(new $controller_class(), $value['action']), $value['params']) === false) {
                     // try call the method as an non-static method. (the if does nothing, only avoids the notice)
                     if (forward_static_call_array(array($controller_class, $value['action']), $value['params']) === false) {
                     }
                 }
             } else {
                 throw new \Exception("Error Processing Request");
             }
         } else {
             throw new \Exception("Error Processing Request");
         }
     }
 }
开发者ID:hillmediakft,项目名称:vframework,代码行数:28,代码来源:dispatcher.php

示例13: updateEmail

 public static function updateEmail($email, $_model = null)
 {
     $modeler = static::$modeler;
     $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : forward_static_call_array(array($modeler, 'model'), array($_model));
     $modeler::model()->updateField($email, 'email');
     return $modeler::model();
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:7,代码来源:ORMModelSetEmailTrait.class.php

示例14: updateComponentSettings

 public static function updateComponentSettings($type, $member, $input_object, $_model = null)
 {
     $modeler = static::$modeler;
     $kit = static::$kit;
     $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : forward_static_call_array(array($modeler, 'model'), array($_model));
     switch ($type) {
         case 'input':
         case 'property':
             $object_member = $type . '_form_object';
             break;
         default:
             return $modeler::model();
     }
     $form_object = json_decode($modeler::model()->{$object_member});
     $component = new \Sequode\Application\Modules\FormInput\Model();
     if (!$component->exists($input_object->Component, 'name')) {
         $component->exists('str', 'name');
     }
     $form_object_member = (object) null;
     $component_form_object = json_decode($component->component_form_object);
     foreach ($component_form_object as $loop_member => $loop_value) {
         if (isset($input_object->{$loop_member})) {
             $form_object_member->{$loop_member} = $input_object->{$loop_member};
         }
     }
     $form_object->{$member} = $form_object_member;
     $modeler::model()->updateField(json_encode($form_object), $object_member);
     self::maintenance();
     return $modeler::model();
 }
开发者ID:shawnlawyer,项目名称:framework,代码行数:30,代码来源:ORMModelSetFormInputComponentSettingsTrait.class.php

示例15: getDispatcher

 /**
  * Returns the event dispatcher.
  *
  * @return \Illuminate\Events\Dispatcher
  */
 public static function getDispatcher()
 {
     if (!isset(static::$dispatcher)) {
         static::$dispatcher = function_exists('app') ? app(Dispatcher::class) : forward_static_call_array('Illuminate\\Container\\Container::make', [Dispatcher::class]);
     }
     return static::$dispatcher;
 }
开发者ID:codexproject,项目名称:core,代码行数:12,代码来源:EventTrait.php


注:本文中的forward_static_call_array函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。