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


PHP b函数代码示例

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


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

示例1: create_image_editbuttons

 /**
  * Metodo statico pubblico accessibile direttamente dall'esterno che
  * restituisce l'html dei pulsanti richiesti.
  *
  * @param array $params Parametri di configurazione generici per la creazione dei pulsanti.
  * @param array $buttons Array multidimensionale contenente i pulsanti richiesti e la loro configurazione.
  * @return string $outhtml Restituisce l'html risultante dalla creazione dei pulsanti.
  */
 public static final function create_image_editbuttons(array $params = [], array $buttons = [])
 {
     if (!isset($buttons[0]['command']) || trim($buttons[0]['command']) == "") {
         exit("Il parametro command e' obbligatorio.");
     }
     $outhtml = "";
     //print_r($params);
     //print_r($buttons);
     /**
      * array('dialog_title' => b('MY_THUMB_EDIT'));
      *
      *
      * array('label' => b('EDIT'),
      *       'width' => $has_thumb ? '161px' : '100%',
      *       'command' => 'user_thumb',
      *       'title'=>b('MY_THUMB_EDIT')
      */
     /**
      * Preparo i pulsanti per la gestione dell'immagine
      */
     $buttonEdit = new aengine_button(['label' => b('EDIT'), 'width' => isset($buttons[0]['width']) ? $buttons[0]['width'] . 'px' : '100%', 'centered' => true, 'css' => 'dark5', 'outer_styles' => ['position:absolute', 'bottom:0px', 'left:0px'], 'command' => 'commandEditButton', 'commandparams' => ['command' => $buttons[0]['command'], 'type' => 'html', 'owner' => 'dialog', 'params' => ['mode' => $params['mode'], 'subgroupId' => isset($params['subgroupId']) ? $params['subgroupId'] : '', 'size' => 'xxl', 'position' => 'auto', 'title' => $params['title'] ? b($params['title']) : b('MY_THUMB_EDIT'), 'close' => true, 'dialog_footer_options' => ['css' => 'dark dark2', 'buttons' => [['label' => b('CHANGE_IMAGE'), 'name' => 'b_back_thumb', 'command' => 'back_thumb', 'hidden' => true, 'commandparams' => ['owner' => $buttons[0]['owner'], 'target' => $buttons[0]['target'], 'params' => ['transition' => 'up@flip', 'callback' => ['type' => "button", 'target' => "b_save_thumb", 'command' => "hide", 'params' => ['transition' => 'prev', 'callback' => ['type' => "button", 'target' => $buttons[0]['subtarget'], 'command' => "hide"]]]]]], ['label' => b('SAVE'), 'type' => 'green', 'name' => 'b_save_thumb', 'command' => 'save_thumb', 'hidden' => true, 'command' => 'uploadImageThumb', 'commandparams' => ['owner' => 'welcome', 'type' => 'component', 'params' => ['mode' => $params['mode']]]]]]]]]);
     $outhtml .= $buttonEdit->display();
     // Se esiste l'immagine allora genero anche il pulsante di eliminazione.
     if (isset($params['avatarImg']) && $params['avatarImg'] != "") {
         //print_r($params);
         $buttonRemove = new aengine_button(['icon' => 'ae-delete-trash-1', 'width' => '40px', 'centered' => true, 'css' => 'brd-left dark5', 'outer_styles' => ['position: absolute', 'bottom: 0px', 'left: ' . $buttons[0]['width'] . 'px'], 'command' => 'buttonImageRemove', 'commandparams' => ['command' => $params['obj'] . '_' . $params['act'], 'target' => isset($params['target']) ? $params['target'] : '', 'type' => 'html', 'params' => $buttons[1]['params']]]);
         $outhtml .= $buttonRemove->display();
     }
     return $outhtml;
 }
开发者ID:clagiordano,项目名称:weblibs,代码行数:38,代码来源:ImageManipulation.php

示例2: a

function a()
{
    $a1 = 1;
    b();
    ~_hotspot0;
    // a.a1:1
}
开发者ID:9Yg1rxeSeha90ZU1,项目名称:pixy,代码行数:7,代码来源:test32.php

示例3: a

function a()
{
    $a1 =& $GLOBALS['x1'];
    b();
    ~_hotspot0;
    // main.x1:U/C, main.x2:U/C, a.a1:T/D
}
开发者ID:9Yg1rxeSeha90ZU1,项目名称:pixy,代码行数:7,代码来源:test12.php

示例4: a

function a()
{
    if (rand()) {
        $a1 =& $a2;
    }
    b(&$a1, &$a2);
}
开发者ID:michaelprem,项目名称:phc,代码行数:7,代码来源:pixy2_fig7.php

示例5: processEvent

 /**
  * process event
  *
  * @param Charcoal_IEventContext $context   event context
  *
  * @return boolean
  */
 public function processEvent($context)
 {
     $request = $context->getRequest();
     // get command line options
     $cmd_path = us($request->getString('p2'));
     $options = array('@:help' => '[command_path]', '@:version' => '', '@:db:generate:model' => 'databse table [target directory]', '@:db:show:table' => 'databse table');
     $examples1 = array('@:help' => '@:version => show "@:version" command help', '@:db:generate:model' => 'charcoal blog => generate "blog" table\'s model files in "charcoal" database' . '(model files are generated into current directory).', '@:db:show:table' => 'charcoal blog => show description about "blog" table in "charcoal" database.');
     $examples2 = array('@:help' => 'list => show all supported commands("list" can be omitted)');
     $descriptions = array('@:help' => 'show command help or list all command paths', '@:version' => 'show framework version.', '@:db:generate:model' => 'create model files into [target directory].', '@:db:show:table' => 'show table description');
     if (empty($cmd_path) || $cmd_path == 'list') {
         // show all commands
         echo "Supported command list: ";
         foreach ($options as $path => $opt) {
             echo "\n  " . $path;
         }
     } elseif (isset($options[$cmd_path])) {
         echo "How to use: ";
         echo "\n  charcoal " . $cmd_path . ' ' . $options[$cmd_path];
         if (isset($examples1[$cmd_path])) {
             echo "\nExample:";
             echo "\n  charcoal " . $cmd_path . ' ' . $examples1[$cmd_path];
             if (isset($examples2[$cmd_path])) {
                 echo "\n  charcoal " . $cmd_path . ' ' . $examples2[$cmd_path];
             }
         }
         if (isset($descriptions[$cmd_path])) {
             echo "\n\nThis command " . $descriptions[$cmd_path];
         }
     } else {
         echo "Command not found: {$cmd_path}";
     }
     echo "\n";
     return b(true);
 }
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:41,代码来源:HelpTask.class.php

示例6: a

function a()
{
    $a1 = 1;
    b(&$a1);
    ~_hotspot0;
    // a.a1:2
}
开发者ID:Beryl-bingqi,项目名称:pixy,代码行数:7,代码来源:test15.php

示例7: render

 /**
  * Render debug trace
  *
  * @param Charcoal_String $title  title
  */
 public function render($e)
 {
     //        Charcoal_ParamTrait::validateException( 1, $e );
     if (!$this->renderers) {
         $this->renderers = array();
         if (!$this->sandbox->isLoaded()) {
             return;
         }
         // Create Debug Trace Renderer
         $debugtrace_renderers = $this->sandbox->getProfile()->getArray('DEBUGTRACE_RENDERER');
         if ($debugtrace_renderers) {
             foreach ($debugtrace_renderers as $renderer_name) {
                 if (strlen($renderer_name) === 0) {
                     continue;
                 }
                 try {
                     $renderer = $this->sandbox->createObject($renderer_name, 'debugtrace_renderer', array(), 'Charcoal_IDebugtraceRenderer');
                     $this->renderers[] = $renderer;
                 } catch (Exception $e) {
                     _catch($e);
                     echo "debugtrace_renderer creation failed:{$e}";
                 }
             }
         }
     }
     $result = b(FALSE);
     foreach ($this->renderers as $renderer) {
         $ret = $renderer->render($e);
         if ($ret === TRUE || $ret instanceof Charcoal_Boolean && $ret->isTrue()) {
             $result = b(TRUE);
         }
     }
     return $result;
 }
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:39,代码来源:DebugTraceRendererList.class.php

示例8: processEvent

 /**
  * process event
  *
  * @param Charcoal_IEventContext $context
  *
  * @return boolean|Charcoal_Boolean
  */
 public function processEvent($context)
 {
     /** @var GenerateModelEvent $event */
     $event = $context->getEvent();
     // get event parameters
     $db_name = $event->getDatabase();
     /** @var Charcoal_SmartGateway $gw */
     $gw = $context->getComponent('smart_gateway@:charcoal:db');
     // find models in project/app path
     $find_path = Charcoal_EnumFindPath::FIND_PATH_PROJECT | Charcoal_EnumFindPath::FIND_PATH_APPLICATION;
     $models = $gw->listModels($find_path);
     // switch database
     $gw->selectDatabase($db_name);
     // create tables
     foreach ($models as $model_name => $model) {
         $table = $model->getTableName();
         echo "creating table: [TABLE NAME]{$table} [MODEL NAME]{$model_name}\n";
         $rows_affected = $gw->createTable(null, $model_name, true);
         if ($rows_affected) {
             echo "successfully created table[{$table}].\n";
         } else {
             echo "failed to create table[{$table}].\n";
         }
     }
     return b(true);
 }
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:33,代码来源:CreateFromModelTask.class.php

示例9: processEvent

 /**
  * イベントを処理する
  *
  * @param Charcoal_IEventContext $context
  *
  * @return boolean
  */
 public function processEvent($context)
 {
     $request = $context->getRequest();
     // パラメータを取得
     $database = us($request->getString('p2'));
     $table = us($request->getString('p3'));
     //=======================================
     // Confirm input parameters
     //=======================================
     if (!empty($database) && !preg_match('/^[0-9a-zA-Z_\\-]*$/', $database)) {
         print "Parameter 2(database name) is wrong: {$database}" . PHP_EOL;
         return b(true);
     }
     if (!empty($table) && !preg_match('/^[0-9a-zA-Z_\\-]*$/', $table)) {
         print "Parameter 3(table name) is wrong: {$table}" . PHP_EOL;
         return b(true);
     }
     //=======================================
     // Send new project event
     //=======================================
     /** @var Charcoal_IEvent $event */
     $event_path = 'show_table_event@:charcoal:db:show:table';
     $event = $context->createEvent($event_path, array($database, $table));
     $context->pushEvent($event);
     return b(true);
 }
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:33,代码来源:ShowTableCommandTask.class.php

示例10: a

function a()
{
    $a1 =& $a2;
    b();
    ~_hotspot1;
    // u{(main.x, main.y, a.x_gs, a.y_gs) (a.a1, a.a2)} a{}
}
开发者ID:9Yg1rxeSeha90ZU1,项目名称:pixy,代码行数:7,代码来源:test04.php

示例11: a

function a()
{
    $a1 =& $GLOBALS['x1'];
    ~_hotspot0;
    // u{ (a.a1, main.x1, a.x1_gs) } a{ }
    b(&$a1);
}
开发者ID:Beryl-bingqi,项目名称:pixy,代码行数:7,代码来源:test08.php

示例12: a

function a()
{
    $a1 =& $GLOBALS['x1'];
    b();
    ~_hotspot1;
    // u{ (a.a1, main.x1, main.x2, a.x1_gs) } a{ }
}
开发者ID:9Yg1rxeSeha90ZU1,项目名称:pixy,代码行数:7,代码来源:test12.php

示例13: processEvent

 /**
  * Process events
  *
  * @param Charcoal_IEventContext $context   event context
  *
  * @return boolean|Charcoal_Boolean
  */
 public function processEvent($context)
 {
     // check if the access is granted
     $auth = $this->isAuthorized($context);
     if (ub($auth) !== TRUE) {
         // create security fault event
         /** @var Charcoal_Event $event */
         $event = $this->getSandbox()->createEvent('security_fault');
         $context->pushEvent($event);
         return b(TRUE);
     }
     // check permissions
     $has_permission = $this->hasPermission($context);
     if (ub($has_permission) !== TRUE) {
         $event = $this->permissionDenied($context);
         if ($event) {
             return $event;
         }
         /** @var Charcoal_Event $event */
         $event = $this->getSandbox()->createEvent('permission_denied');
         $context->pushEvent($event);
         return b(TRUE);
     }
     return $this->processEventSecure($context);
 }
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:32,代码来源:SecureTask.class.php

示例14: a

function a()
{
    if ($u) {
        $a1 =& $a2;
    }
    b(&$a1, &$a2);
}
开发者ID:Beryl-bingqi,项目名称:pixy,代码行数:7,代码来源:test11.php

示例15: a

function a()
{
    if (!function_exists('b')) {
        b();
    }
    echo 'I am a';
}
开发者ID:kshark27,项目名称:Violist,代码行数:7,代码来源:methods.php


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