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


PHP ns函数代码示例

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


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

示例1: parse_post

 /**
  *
  */
 private function parse_post()
 {
     if (@$_SERVER['REQUEST_METHOD'] != 'POST') {
         $this->pd = (object) [];
         $this->fd = (object) [];
         return;
     }
     $_POST = array_map(ns('stripslashes_deep'), $_POST);
     $this->pd = (object) @$_POST;
     $this->fd = (object) (@$_FILES ?: []);
 }
开发者ID:rommelsantor,项目名称:RawMVC,代码行数:14,代码来源:controller.php

示例2: setup

/**
 * Default setup routine
 *
 * @uses add_action()
 * @uses do_action()
 *
 * @return void
 */
function setup()
{
    function ns($function)
    {
        return __NAMESPACE__ . "\\{$function}";
    }
    add_action('init', ns('init'));
    add_action(__NAMESPACE__ . '\\init', ns('i18n'));
    //activate current version of this plugin
    add_action('admin_init', ns('activate'));
    do_action(__NAMESPACE__ . '\\loaded');
    //add data to wp_send_json_*
    add_filter('pp-ajax-data', ns('tack_on_ajax_response'));
}
开发者ID:Shelob9,项目名称:eight-day-week,代码行数:22,代码来源:core.php

示例3: render

    <div id="main-content" class="region clearfix">
      <?php 
print render($page['content']);
?>
    </div>

    <?php 
print $feed_icons;
?>
  </div>

<?php 
if ($page['sidebar_first']) {
    ?>
  <div id="sidebar-left" class="column sidebar region grid-4 <?php 
    print ns('pull-12', $page['sidebar_second'], 3);
    ?>
">
    <?php 
    print render($page['sidebar_first']);
    ?>
  </div>
<?php 
}
?>

<?php 
if ($page['sidebar_second']) {
    ?>
  <div id="sidebar-right" class="column sidebar region grid-3">
    <?php 
开发者ID:seavagabond,项目名称:demo-rwd-7x,代码行数:31,代码来源:page.tpl.php

示例4: elseif

    $main_sidebar_adjust_outer = "";
    $main_sidebar_adjust_inner = "";
} elseif ($left) {
    $main_sidebar_adjust_outer = "omega";
    $main_sidebar_adjust_inner = "container-padding-right";
} elseif ($right) {
    $main_sidebar_adjust_outer = "alpha";
    $main_sidebar_adjust_inner = "container-padding-left";
} else {
    $main_sidebar_adjust_outer = "alpha omega";
    $main_sidebar_adjust_inner = "container-padding-left container-padding-right";
}
?>
      
      <div id="main" class="column <?php 
print ns('grid-16', $left, 3, $right, 4) . ' ' . $main_sidebar_adjust_outer;
?>
">
        <div id="main-inner" class="<?php 
print $main_sidebar_adjust_inner;
?>
" >
        <?php 
if ($tabs) {
    ?>
			<?php 
    $path = explode('/', drupal_get_path_alias($_GET['q']));
    if ($path[0] != 'job-seeker') {
        ?>
          <div class="tabs"><?php 
        print $tabs;
开发者ID:davidclarkmoore,项目名称:vintage-enoteca,代码行数:31,代码来源:page.tpl.php

示例5: ns

print $content_top;
?>
          <?php 
print $content;
?>
          <?php 
print $content_bottom;
?>
        </div>
      </div>

      <?php 
if ($left) {
    ?>
      <div id="sidebar-left" class="column sidebar region grid-4 <?php 
    print ns('pull-12', $right, 4);
    ?>
">
          <?php 
    print $left;
    ?>
      </div>
      <?php 
}
?>

      <?php 
if ($right) {
    ?>
      <div id="sidebar-right" class="column alpha sidebar region grid-4">
          <?php 
开发者ID:rmontero,项目名称:dla_ecommerce_site,代码行数:31,代码来源:page.tpl.php

示例6: ns

      <div id="main-content" class="region clear-block">
        <?php 
print $content;
?>
      </div>

      <?php 
print $feed_icons;
?>
    </div>

  <?php 
if ($left) {
    ?>
    <div id="sidebar-left" class="column sidebar region grid-3 <?php 
    print ns('pull-13', $right, 3);
    ?>
">
      <?php 
    print $left;
    ?>
    </div>
  <?php 
}
?>

  <?php 
if ($right) {
    ?>
    <div id="sidebar-right" class="column sidebar region grid-3">
      <?php 
开发者ID:BernieCram,项目名称:drupalmel,代码行数:31,代码来源:page.tpl.php

示例7: ns

		<?php 
print $help;
?>
		<?php 
print $content;
?>
      	</div>
      	<?php 
print $feed_icons;
?>
    </div>
  <?php 
if ($left) {
    ?>
    <div id="sidebar-left" class="column sidebar region grid-2 <?php 
    print ns('pull-10', $right, 3);
    ?>
">
      <?php 
    print $left;
    ?>
    </div>
  <?php 
}
?>
  <?php 
if ($right) {
    ?>
    <div id="sidebar-right" class="column sidebar region grid-3">
      <?php 
    print $right;
开发者ID:maduhu,项目名称:opengovplatform-alpha,代码行数:31,代码来源:page-sample.tpl.php

示例8: a

 function a($function)
 {
     add_action($function, ns($function));
 }
开发者ID:Shelob9,项目名称:eight-day-week,代码行数:4,代码来源:admin-menu-page.php

示例9: fwrite

					</center><br /><div style="font-size: 10px;">Powered by <a href="http://www.bigprof.com/appgini/" target=_blank>BigProf AppGini 4.52</a></div>
				</div>
			</form>
		<?php 
    exit;
} else {
    // if connection is successful, save parameters into config.php
    if (!($fp = @fopen("./config.php", "w"))) {
        echo $divFormat . "<div style=\"color: red;\">" . $Translation["couldnt save config"] . "</div></div><br />";
        echo $backHome;
        exit;
    } else {
        fwrite($fp, "<?php\n");
        fwrite($fp, "\t\$dbServer='" . ns($dbServer) . "';\n");
        fwrite($fp, "\t\$dbUsername='" . ns($dbUsername) . "';\n");
        fwrite($fp, "\t\$dbPassword='" . ns($dbPassword) . "';\n");
        fwrite($fp, "\t\$dbDatabase='" . ns($dbDatabase) . "';\n");
        fwrite($fp, "?>");
        fclose($fp);
    }
}
$silent = false;
include "{$d}/updateDB.php";
if ($setupAlreadyRun) {
    echo "{$divFormat} {$Translation['setup performed']} " . @date('r', filemtime(dirname(__FILE__) . '/setup.md5')) . '<br /><br /></div>';
    echo "{$divFormat}<div style=\"font-size: 10px;\">" . $Translation["delete md5"] . "</div></div><br /><br />";
    echo $backHome;
    exit;
}
// go to index
echo $backHome;
开发者ID:bigprof,项目名称:Symptoms-and-diseases-database,代码行数:31,代码来源:setup.php

示例10: ns

?>
        </div>
  
        <span class="grid-1 prefix-1">  
	  <?php 
print $feed_icons;
?>
        </span>
      </div>
      
  
      <?php 
if ($left) {
    ?>
        <div id="sidebar-left" class="sidebar grid-4 <?php 
    print ns('pull-11', $right, 3);
    ?>
">
          <?php 
    print $left;
    ?>
        </div>
      <?php 
}
?>

      <div id="sidebar-right" class="sidebar grid-4">
        <?php 
if ($right) {
    ?>
          <?php 
开发者ID:KyleAMathews,项目名称:dewey,代码行数:31,代码来源:page.tpl.php

示例11: ns

          <?php 
    print $navigation;
    ?>

        </div></div> <!-- /.section, /#navigation -->
      <?php 
}
?>

    </div></div> <!-- /#main, /#main-wrapper -->

    <?php 
if ($sidebar_first) {
    ?>
      <div id="sidebar-first" class="column sidebar region grid-4 <?php 
    print ns('pull-12', $sidebar_second, 3);
    ?>
">
        <?php 
    print $sidebar_first;
    ?>
      </div>
    <?php 
}
?>

    <?php 
if ($sidebar_second) {
    ?>
      <div id="sidebar_second" class="column sidebar region grid-3">
        <?php 
开发者ID:vagrantscholar,项目名称:zen_ninesixty,代码行数:31,代码来源:page.tpl.php

示例12: control_request

 /**
  *
  */
 private function control_request($i_controllerName, $i_action, array $i_params)
 {
     $filename_prefix = str_replace('-', '', $i_controllerName);
     $class_prefix = str_replace('-', '', $i_controllerName);
     if (!self::has_controller($filename_prefix)) {
         self::error_404('Controller not loaded');
     }
     $controller_class = ns($class_prefix . 'Controller');
     $controller = new $controller_class($i_action, $i_params);
     if (!$controller->is_valid_action($i_action)) {
         if ($i_action != 'index') {
             array_unshift($i_params, $i_action);
             $i_action = 'index';
             $controller = new $controller_class($i_action, $i_params);
         } else {
             self::error_404('Invalid action requested');
         }
     }
     $result = $controller->_call_action($i_action, $i_params);
     if (is_array($result)) {
         header('Content-Type: application/json');
         die(json_encode($result));
     }
     if (!self::load('view/' . $filename_prefix . '.php')) {
         return $result;
     }
     $view_class = ns($class_prefix . 'View');
     $view = new $view_class($controller);
     $output = $view->render();
     if ($output === false) {
         self::error_404('View rendered blank');
     }
     echo $output;
     exit;
 }
开发者ID:rommelsantor,项目名称:RawMVC,代码行数:38,代码来源:kernel.php

示例13: ns

    if ($linked_logo_img) {
        print ' prefix-1';
    }
    ?>
">
          <?php 
    print $main_menu_links;
    ?>
        </div>
      <?php 
}
?>

        <!-- Replace language switch with return link -->
        <div id="language-switcher" class="grid-3 <?php 
print ns('prefix-9', $main_menu_links, 9);
?>
">
          <a href="javascript:window.history.back();"><?php 
print t('Return to BiblioBird');
?>
 &gt;&gt;</a>
        </div>
      </div>
    </div>

    <?php 
print $content;
?>
  </div>
开发者ID:rollinsb1010,项目名称:bbcom,代码行数:30,代码来源:page-embed-reader-remote.tpl.php

示例14: testNamespace

 /**
  * @dataProvider providerForTestNamespace
  */
 function testNamespace(string $src, string $expected)
 {
     $ts = TokenStream::fromSource($src);
     $this->parseSuccess($ts, token(T_OPEN_TAG), "T_OPEN_TAG(<?php )");
     $this->parseSuccess($ts, ns(), $expected);
 }
开发者ID:assertchris,项目名称:yay,代码行数:9,代码来源:ParserTest.php

示例15: ns



  <?php 
if ($left) {
    ?>
    <div id="sidebar-left" class="column sidebar region grid-4">
      <?php 
    print $left;
    ?>
    </div>
  <?php 
}
?>

    <div id="main" class="column <?php 
print ns('grid-16', $left, 4, $right, 3);
?>
">
      <?php 
print $breadcrumb;
?>
      <?php 
if ($title) {
    ?>
        <h1 class="title" id="page-title"><?php 
    print $title;
    ?>
</h1>
      <?php 
}
?>
开发者ID:javaperl,项目名称:fcase,代码行数:29,代码来源:page.tpl.php


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