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