當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。