• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP forward_static_call函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _

 /**
  * Render extjs text form field
  *
  * @param \Engine\Crud\Form\Field $field
  * @return string
  */
 public static function _(Field\PasswordConfirm $field)
 {
     $fieldCode = [];
     if ($field->isHidden()) {
         $fieldCode[] = "xtype: 'hiddenfield'";
     } else {
         $fieldCode[] = "xtype: 'textfield'";
     }
     $fieldCode[] = "name: '" . $field->getKey() . "'";
     $fieldCode[] = "inputType: 'password'";
     $fieldCode[] = "allowBlank: " . ($field->isRequire() ? "false" : "true");
     $label = $field->getLabel();
     if ($label) {
         $fieldCode[] = "fieldLabel: '" . $label . "'";
     }
     $desc = $field->getDesc();
     if ($desc) {
         $fieldCode[] = "boxLabel: '" . $desc . "'";
     }
     $width = $field->getWidth();
     if ($width) {
         $fieldCode[] = "width: " . $width;
     }
     $confirmKey = $field->getConfirmKey();
     $fieldCode[] = "validator: function(value) {\n                    var password1 = this.previousSibling('[name=" . $confirmKey . "]');\n                    return (value === password1.getValue()) ? true : 'Passwords do not match.'\n                }";
     return forward_static_call(['self', '_implode'], $fieldCode);
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:33,代码来源:PasswordConfirm.php


示例2: run

 /**
  * Run cron task. Attention - this method is too 'fat' to run from any app's
  * @return array|null
  */
 public function run()
 {
     // check if cron instances is defined
     if (!isset($this->configs['instances']) || !Obj::isArray($this->configs['instances'])) {
         return null;
     }
     // get timestamp
     $time = time();
     $log = [];
     // each every one instance
     foreach ($this->configs['instances'] as $callback => $delay) {
         if ((int) $this->configs['log'][$callback] + $delay <= $time) {
             // prepare cron initializing
             list($class, $method) = explode('::', $callback);
             if (class_exists($class) && method_exists($class, $method)) {
                 // make static callback
                 forward_static_call([$class, $method]);
                 $log[] = $callback;
             }
             // update log information
             $this->configs['log'][$callback] = $time + $delay;
         }
     }
     // write updated configs
     App::$Properties->writeConfig('Cron', $this->configs);
     return $log;
 }
开发者ID:phpffcms,项目名称:ffcms-core,代码行数:31,代码来源:CronManager.php


示例3: _

 /**
  * Render extjs number form field
  *
  * @param \Engine\Crud\Form\Field $field
  * @return string
  */
 public static function _(Field\Numeric $field)
 {
     $fieldCode = [];
     if ($field->isHidden()) {
         $fieldCode[] = "xtype: 'hiddenfield'";
     } else {
         $fieldCode[] = "xtype: 'numberfield'";
     }
     if ($field->isNotEdit()) {
         $fieldCode[] = "readOnly: true";
     }
     $fieldCode[] = "name: '" . $field->getKey() . "'";
     $fieldCode[] = "allowBlank: " . ($field->isRequire() ? "false" : "true");
     $label = $field->getLabel();
     if ($label) {
         $fieldCode[] = "fieldLabel: '" . $label . "'";
     }
     $desc = $field->getDesc();
     if ($desc) {
         $fieldCode[] = "boxLabel: '" . $desc . "'";
     }
     $width = $field->getWidth();
     if ($width) {
         $fieldCode[] = "width: " . $width;
     }
     $minValue = $field->getMinValue();
     $maxValue = $field->getMaxValue();
     if ($minValue !== null && $minValue !== false) {
         $fieldCode[] = " minValue: '" . $minValue . "'";
     }
     if ($maxValue !== null && $maxValue !== false) {
         $fieldCode[] = " maxValue: '" . $maxValue . "'";
     }
     return forward_static_call(['self', '_implode'], $fieldCode);
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:41,代码来源:Numeric.php


示例4: getValue

 public function getValue($param = null)
 {
     if ($this->_value != null) {
         return parent::getValue();
     }
     if (!$this->getParent()) {
         throw new Exception(sprintf("Meta property '%s' missing a parent reference", $this->_id));
     }
     $property = $this->getParent()->getRecursiveProperty($this->getParameter('property'));
     if ($property instanceof CollectionProperty) {
         $subParts = explode('.', $this->getParameter('action'));
         $collection = $property->getValue();
         return $collection->{$subParts[0]}(isset($subParts[1]) ? $subParts[1] : null);
     } else {
         if ($property instanceof ObjectProperty) {
             $subParts = explode('.', $this->getParameter('action'));
             $object = $property->getValue(ObjectModel::MODEL);
             return $object instanceof BaseObject ? $object->{$subParts[0]}(isset($subParts[1]) ? $subParts[1] : null) : null;
         } else {
             $class = $this->_parent->getClass();
             $action = $this->getParameter('action');
             $array = array($this->_parent->getClass(), $this->getParameter('action'));
             try {
                 $val = forward_static_call($array, $this->_parent);
             } catch (\Exception $e) {
                 throw new Exception($e->getMessage());
             }
             return $val;
         }
     }
 }
开发者ID:crapougnax,项目名称:t41,代码行数:31,代码来源:MetaProperty.php


示例5: _

 /**
  * Render extjs mail form field
  *
  * @param \Engine\Crud\Form\Field $field
  * @return string
  */
 public static function _(Field $field)
 {
     $fieldCode = [];
     if ($field->isHidden()) {
         $fieldCode[] = "xtype: 'hiddenfield'";
     } else {
         $fieldCode[] = "xtype: 'textfield'";
     }
     if ($field->isNotEdit()) {
         $fieldCode[] = "readOnly: true";
     }
     $fieldCode[] = "name: '" . $field->getKey() . "'";
     $fieldCode[] = "allowBlank: " . ($field->isRequire() ? "false" : "true");
     $label = $field->getLabel();
     if ($label) {
         $fieldCode[] = "fieldLabel: '" . $label . "'";
     }
     $desc = $field->getDesc();
     if ($desc) {
         $fieldCode[] = "boxLabel: '" . $desc . "'";
     }
     $width = $field->getWidth();
     if ($width) {
         $fieldCode[] = "width: " . $width;
     }
     $fieldCode[] = "vtype: 'email'";
     return forward_static_call(['self', '_implode'], $fieldCode);
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:34,代码来源:Mail.php


示例6: _

 /**
  * Render extjs image file uplaod form field
  *
  * @param \Engine\Crud\Form\Field $field
  * @return string
  */
 public static function _(Field\Image $field)
 {
     $fieldCode = [];
     if ($field->isHidden()) {
         $fieldCode[] = "xtype: 'hiddenfield'";
     } else {
         $fieldCode[] = "xtype: 'filefield'";
     }
     if ($field->isNotEdit()) {
         $fieldCode[] = "readOnly: true";
     }
     $fieldCode[] = "name: '" . $field->getKey() . "'";
     $fieldCode[] = "allowBlank: " . ($field->isRequire() ? "false" : "true");
     $label = $field->getLabel();
     if ($label) {
         $fieldCode[] = "fieldLabel: '" . $label . "'";
     }
     $desc = $field->getDesc();
     if ($desc) {
         $fieldCode[] = "boxLabel: '" . $desc . "'";
     }
     $width = $field->getWidth();
     if ($width) {
         $fieldCode[] = "width: " . $width;
     }
     $fieldCode[] = "emptyText: 'Select an image'";
     $fieldCode[] = "buttonText: ''";
     $fieldCode[] = "buttonConfig: {iconCls: 'icon-upload'}";
     return forward_static_call(['self', '_implode'], $fieldCode);
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:36,代码来源:Image.php


示例7: _getStore

 /**
  * Gets, and creates if neccessary, a store object
  *
  * @return AbstractData
  */
 private function _getStore()
 {
     if ($this->_store === null) {
         $this->_store = forward_static_call('PrivateBin\\Data\\' . $this->_conf->getKey('class', 'model') . '::getInstance', $this->_conf->getSection('model_options'));
     }
     return $this->_store;
 }
开发者ID:privatebin,项目名称:privatebin,代码行数:12,代码来源:Model.php


示例8: _

 /**
  * Render extjs password form field
  *
  * @param \Engine\Crud\Form\Field $field
  * @return string
  */
 public static function _(Field\Password $field)
 {
     $fieldCode = [];
     if ($field->isHidden()) {
         $fieldCode[] = "xtype: 'hiddenfield'";
     } else {
         $fieldCode[] = "xtype: 'textfield'";
     }
     $fieldCode[] = "name: '" . $field->getKey() . "'";
     $fieldCode[] = "inputType: 'password'";
     $fieldCode[] = "allowBlank: " . ($field->isRequire() ? "false" : "true");
     $label = $field->getLabel();
     if ($label) {
         $fieldCode[] = "fieldLabel: '" . $label . "'";
     }
     $desc = $field->getDesc();
     if ($desc) {
         $fieldCode[] = "boxLabel: '" . $desc . "'";
     }
     $width = $field->getWidth();
     if ($width) {
         $fieldCode[] = "width: " . $width;
     }
     $minLength = $field->getMinLength();
     $fieldCode[] = "minLength: " . $minLength;
     return forward_static_call(['self', '_implode'], $fieldCode);
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:33,代码来源:Password.php


示例9: findVariable

 /**
  * @param $slug string
  * @return string|null
  */
 protected function findVariable($slug)
 {
     /** @var $modelQuery \yii\db\ActiveQuery */
     $modelQuery = forward_static_call([\Yii::createObject(VariableModel::class), 'find']);
     $variable = $modelQuery->where(['slug' => $slug])->one();
     return $variable ? $variable['content'] : null;
 }
开发者ID:roboapp,项目名称:variable,代码行数:11,代码来源:Variable.php


示例10: _getStore

 /**
  * Gets, and creates if neccessary, a store object
  */
 private function _getStore()
 {
     if ($this->_store === null) {
         $this->_store = forward_static_call(array($this->_conf->getKey('class', 'model'), 'getInstance'), $this->_conf->getSection('model_options'));
     }
     return $this->_store;
 }
开发者ID:kolobus,项目名称:ZeroBin,代码行数:10,代码来源:model.php


示例11: registerObserver

 /**
  * Register auth model observers.
  *
  * @return void
  */
 protected function registerObserver()
 {
     $config = $this->app['config'];
     $model = $config->get('laravie/warden::model', $config->get('auth.model'));
     $observer = new UserObserver($this->app->make('laravie.warden'), $config->get('laravie/warden', []));
     forward_static_call([$model, 'observe'], $observer);
 }
开发者ID:laravie,项目名称:warden,代码行数:12,代码来源:WardenServiceProvider.php


示例12: _

 /**
  * Render extjs number filter field
  *
  * @param \Engine\Crud\Grid\Filter\Field $field
  * @return string
  */
 public static function _(Field\Numeric $field)
 {
     $fieldCode = [];
     $fieldCode[] = "xtype: 'numberfield'";
     $fieldCode[] = "name: '" . $field->getKey() . "'";
     $label = $field->getLabel();
     if ($label) {
         $fieldCode[] = "fieldLabel: '" . $label . "'";
     }
     $desc = $field->getDesc();
     if ($desc) {
         $fieldCode[] = "boxLabel: '" . $desc . "'";
     }
     $width = $field->getWidth();
     if ($width) {
         $fieldCode[] = "width: " . $width;
     }
     $minValue = $field->getMinValue();
     $maxValue = $field->getMaxValue();
     if ($minValue !== null && $minValue !== false) {
         $fieldCode[] = " minValue: '" . $minValue . "'";
     }
     if ($maxValue !== null && $maxValue !== false) {
         $fieldCode[] = " maxValue: '" . $maxValue . "'";
     }
     return forward_static_call(['self', '_implode'], $fieldCode);
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:33,代码来源:Numeric.php


示例13: _

 /**
  * Render extjs combobox filter field
  *
  * @param \Engine\Crud\Grid\Filter\Field $field
  * @return string
  */
 public static function _(Field\ArrayToSelect $field)
 {
     $fieldCode = [];
     $fieldCode[] = "xtype: 'combobox'";
     $fieldCode[] = "name: '" . $field->getKey() . "'";
     $label = $field->getLabel();
     if ($label) {
         $fieldCode[] = "fieldLabel: '" . $label . "'";
     }
     $desc = $field->getDesc();
     if ($desc) {
         $fieldCode[] = "boxLabel: '" . $desc . "'";
     }
     $width = $field->getWidth();
     if ($width) {
         $fieldCode[] = "width: " . $width;
     }
     $fieldCode[] = "typeAhead: true";
     $fieldCode[] = "triggerAction: 'all'";
     $fieldCode[] = "selectOnTab: true";
     $fieldCode[] = "lazyRender: true";
     $fieldCode[] = "listClass: 'x-combo-list-small'";
     $fieldCode[] = "queryMode: 'local'";
     $fieldCode[] = "displayField: 'name'";
     $fieldCode[] = "valueField: 'id'";
     $fieldCode[] = "valueNotFoundText: 'Nothing found'";
     $store = forward_static_call(['static', '_getStore'], $field);
     $fieldCode[] = "store: " . $store;
     return forward_static_call(['static', '_implode'], $fieldCode);
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:36,代码来源:Combobox.php


示例14: bootEloquentValidatingTrait

 /**
  * Eloquent will call this on model boot
  */
 public static function bootEloquentValidatingTrait()
 {
     // Calling Model::saving() and asking it to execute assertIsValid() before model is saved into database
     $savingCallable = [static::class, 'saving'];
     $validationCallable = [static::class, 'assertIsValid'];
     forward_static_call($savingCallable, $validationCallable);
 }
开发者ID:fhteam,项目名称:laravel-validator,代码行数:10,代码来源:EloquentValidatingTrait.php


示例15: fire

 /**
  * @param Job $syncJob Laravel queue job
  * @param $arguments
  * @return bool
  * @throws \Unifact\Connector\Exceptions\HandlerException
  */
 public function fire(Job $syncJob, $arguments)
 {
     try {
         $job = $this->jobRepo->findById($arguments['job_id']);
         $job->setPreviousStatus($arguments['previous_status']);
         $handler = forward_static_call([$job->handler, 'make']);
         $this->logger->debug("Preparing Job..");
         if (!$handler->prepare()) {
             $this->logger->error('Handler returned FALSE in prepare() method, see log for details');
             // delete Laravel queue job
             $syncJob->delete();
             return false;
         }
         $this->logger->debug("Handling Job..");
         if ($handler->handle($job) === false) {
             $this->logger->error('Handler returned FALSE in handle() method, see log for details');
             // delete Laravel queue job
             $syncJob->delete();
             return false;
         }
         $this->logger->debug("Completing Job..");
         $handler->complete();
         $this->logger->info('Finished Job successfully');
     } catch (\Exception $e) {
         $this->oracle->exception($e);
         $this->logger->error('Exception was thrown in JobQueueHandler::fire method.');
         $this->jobRepo->update($arguments['job_id'], ['status' => 'error']);
         // delete Laravel queue job
         $syncJob->delete();
         return false;
     }
     // delete Laravel queue job
     $syncJob->delete();
     return true;
 }
开发者ID:unifact,项目名称:connector,代码行数:41,代码来源:JobQueueHandler.php


示例16: run

 public static function run($base64_png_data, $program = null)
 {
     self::init();
     $filename = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('OCR_') . '.png';
     file_put_contents($filename, base64_decode($base64_png_data));
     $programs = array();
     if ($program !== null) {
         if (in_array($program, self::$installed_ocr_programs)) {
             $programs[] = $program;
         } else {
             throw new Exception("OCR program {$program} is not available.");
         }
     } else {
         $programs = self::$installed_ocr_programs;
     }
     $class = get_called_class();
     $results = array();
     foreach ($programs as $program) {
         $method = "run_{$program}";
         if (method_exists($class, $method)) {
             $results[$program] = '';
             foreach (forward_static_call(array($class, $method), $filename) as $line) {
                 $line = trim($line);
                 if ($line) {
                     $results[$program] .= "{$line}\n";
                 }
             }
         } else {
             throw new Exception("Unknown OCR method {$method}");
         }
     }
     @unlink($filename);
     return $results;
 }
开发者ID:ImangazalievForks,项目名称:ocr-wrapper,代码行数:34,代码来源:OCR.php


示例17: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params, $id_parent)
 {
     $module = Module::getInst();
     $pageTable = static::tableName();
     $pageLangTable = forward_static_call(array($module->manager->pageLangClass, 'tableName'));
     $query = static::find()->from(['p' => $pageTable])->innerJoin(['l' => $pageLangTable], 'l.page_id=p.id AND l.language_id=:language_id', [':language_id' => Yii::$app->getI18n()->getId()]);
     $loadParams = $this->load($params);
     if ($this->id_parent) {
         $query->innerJoin(['l2' => $pageLangTable], 'l2.page_id=p.id_parent AND l2.language_id=:language_id', [':language_id' => Yii::$app->getI18n()->getId()]);
     }
     $query->with(['parent', 'translations']);
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['weight' => SORT_ASC]]]);
     if ($id_parent !== false) {
         if (empty($id_parent)) {
             $query->where(['id_parent' => null]);
         } else {
             $query->where(['id_parent' => $id_parent]);
         }
     }
     if (!($loadParams && $this->validate())) {
         return $dataProvider;
     }
     $dataProvider->sort->attributes['name']['asc'] = ['l.name' => SORT_ASC];
     $dataProvider->sort->attributes['name']['desc'] = ['l.name' => SORT_DESC];
     $dataProvider->sort->attributes['title']['asc'] = ['l.title' => SORT_ASC];
     $dataProvider->sort->attributes['title']['desc'] = ['l.title' => SORT_DESC];
     $dataProvider->sort->attributes['alias']['asc'] = ['l.alias' => SORT_ASC];
     $dataProvider->sort->attributes['alias']['desc'] = ['l.alias' => SORT_DESC];
     $query->andFilterWhere(['p.id' => $this->id, 'p.weight' => $this->weight, 'p.layout' => $this->layout, 'p.type' => $this->type, 'p.visible' => $this->visible, 'p.active' => $this->active]);
     $query->andFilterWhere(['like', 'l.name', $this->name])->andFilterWhere(['like', 'l.title', $this->title])->andFilterWhere(['like', 'l.alias', $this->alias]);
     if ($this->id_parent) {
         $query->andFilterWhere(['like', 'l2.name', $this->id_parent]);
     }
     return $dataProvider;
 }
开发者ID:pavlinter,项目名称:yii2-adm-app,代码行数:42,代码来源:PageSearch.php


示例18: bootTraits

 /**
  * Boot all of the bootable traits on the model.
  *
  * @return void
  */
 protected static function bootTraits()
 {
     foreach (class_uses_recursive(get_called_class()) as $trait) {
         if (method_exists(get_called_class(), $method = 'boot' . class_basename($trait))) {
             forward_static_call([get_called_class(), $method]);
         }
     }
 }
开发者ID:laradic,项目名称:support,代码行数:13,代码来源:Bootable.php


示例19: nestableGrid

 /**
  * @return mixed
  */
 public function nestableGrid()
 {
     if (!is_array($this->nestable)) {
         $this->nestable = [];
     }
     $nestable = ArrayHelper::merge(['class' => $this->nestableClass, 'grid' => $this], $this->nestable);
     return forward_static_call([$nestable['class'], 'widget'], $nestable);
 }
开发者ID:pavlinter,项目名称:yii2-adm,代码行数:11,代码来源:GridView.php


示例20: call

 protected function call($format, $method)
 {
     $class = __NAMESPACE__ . "\\" . $format;
     if (!class_exists($class)) {
         throw new SerialException("Unrecognised format " . $format);
     }
     $this->data = forward_static_call([$class, $method], $this->data);
 }
开发者ID:Masterfion,项目名称:plugin-sonos,代码行数:8,代码来源:Serial.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP forward_static_call_array函数代码示例发布时间:2022-05-15
下一篇:
PHP forward函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap