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


PHP Signal::connect方法代码示例

本文整理汇总了PHP中Signal::connect方法的典型用法代码示例。如果您正苦于以下问题:PHP Signal::connect方法的具体用法?PHP Signal::connect怎么用?PHP Signal::connect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Signal的用法示例。


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

示例1: bootstrap

 public function bootstrap()
 {
     $config = $this->getConfig();
     if ($config->get('ajax_submission_enable')) {
         Signal::connect('ajax.client', ['AjaxPlugin', 'registerDispatch']);
     }
 }
开发者ID:kohenkatz,项目名称:OST-AJAX,代码行数:7,代码来源:ajax.php

示例2: bootstrap

 public function bootstrap()
 {
     if ($this->firstRun()) {
         $this->install();
     }
     Signal::connect('apps.scp', array('EquipmentPlugin', 'callbackDispatch'));
     $this->createStaffMenu();
 }
开发者ID:flotwig,项目名称:osTicket-Equipment,代码行数:8,代码来源:equipment.php

示例3: array

}, 30);
// Manage materialized view on custom data updates
Signal::connect('model.created', array('TicketForm', 'updateDynamicDataView'), 'DynamicFormEntryAnswer');
Signal::connect('model.updated', array('TicketForm', 'updateDynamicDataView'), 'DynamicFormEntryAnswer');
// Recreate the dynamic view after new or removed fields to the ticket
// details form
Signal::connect('model.created', array('TicketForm', 'dropDynamicDataView'), 'DynamicFormField', function ($o) {
    return $o->getForm()->get('type') == 'T';
});
Signal::connect('model.deleted', array('TicketForm', 'dropDynamicDataView'), 'DynamicFormField', function ($o) {
    return $o->getForm()->get('type') == 'T';
});
// If the `name` column is in the dirty list, we would be renaming a
// column. Delete the view instead.
Signal::connect('model.updated', array('TicketForm', 'dropDynamicDataView'), 'DynamicFormField', function ($o, $d) {
    return isset($d['dirty']) && (isset($d['dirty']['name']) || isset($d['dirty']['type']));
});
require_once INCLUDE_DIR . "class.json.php";
class DynamicFormField extends VerySimpleModel
{
    static $meta = array('table' => FORM_FIELD_TABLE, 'ordering' => array('sort'), 'pk' => array('id'), 'joins' => array('form' => array('null' => true, 'constraint' => array('form_id' => 'DynamicForm.id'))));
    var $_field;
    // Multiple inheritance -- delegate to FormField
    function __call($what, $args)
    {
        return call_user_func_array(array($this->getField(), $what), $args);
    }
    function getField($cache = true)
    {
        if (!$cache) {
            return new FormField($this->ht);
开发者ID:ed00m,项目名称:osTicket-1.8,代码行数:31,代码来源:class.dynamic_forms.php

示例4: bootstrap

 function bootstrap()
 {
     if ($this->getConfig()->get('reindex', true)) {
         Signal::connect('cron', array($this, 'IndexOldStuff'));
     }
 }
开发者ID:KM-MFG,项目名称:osTicket-1.8,代码行数:6,代码来源:class.search.php

示例5: bootstrap

 function bootstrap()
 {
     if ($this->firstRun()) {
         if (!$this->configureFirstRun()) {
             return false;
         }
     } else {
         if ($this->needUpgrade()) {
             $this->configureUpgrade();
         }
     }
     $config = $this->getConfig();
     if ($config->get('equipment_backend_enable')) {
         $this->createStaffMenu();
     }
     if ($config->get('equipment_frontend_enable')) {
         $this->createFrontMenu();
     }
     Signal::connect('apps.scp', array('EquipmentPlugin', 'callbackDispatch'));
 }
开发者ID:flotwig,项目名称:OSTEquipmentPlugin,代码行数:20,代码来源:equipment.php

示例6: triggerAuth

            </div>
<?php 
        }
        ?>
        </a><?php 
    }
    function triggerAuth()
    {
        $_SESSION['ext:bk:class'] = get_class($this);
    }
}
Signal::connect('api', function ($dispatcher) {
    $dispatcher->append(url('^/auth/ext$', function () {
        if ($class = $_SESSION['ext:bk:class']) {
            $bk = StaffAuthenticationBackend::getBackend($class::$id) ?: UserAuthenticationBackend::getBackend($class::$id);
            if ($bk instanceof ExternalAuthentication) {
                $bk->triggerAuth();
            }
        }
    }));
});
abstract class UserAuthenticationBackend extends AuthenticationBackend
{
    private static $_registry = array();
    static function _register($class)
    {
        static::$_registry[$class::$id] = $class;
    }
    static function allRegistered()
    {
        return array_merge(self::$_registry, parent::allRegistered());
    }
开发者ID:KingsleyGU,项目名称:osticket,代码行数:32,代码来源:class.auth.php

示例7: bootstrap

 function bootstrap()
 {
     Signal::connect('model.created', array($this, 'onTicketCreated'), 'Ticket');
     Signal::connect('model.created', array($this, 'onThreadEntryCreated'), 'ThreadEntry');
 }
开发者ID:tuudik,项目名称:osticket-rocketchat,代码行数:5,代码来源:rocketchat.php

示例8: bootstrap

 function bootstrap()
 {
     Signal::connect('cron', array($this, 'IndexOldStuff'));
 }
开发者ID:ayurmedia,项目名称:osTicket-1.8,代码行数:4,代码来源:class.search.php


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