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


PHP Api::call方法代码示例

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


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

示例1: header

<?php

header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
// Add your secret repo and credential here
$configs = array("username" => "user", "password" => "password", "repo_owner" => "repo_owner", "repo" => "repo");
// Handle Request
$action = $_GET["action"];
echo Api::call($action, $configs);
class Api
{
    public function call($action, $configs)
    {
        return self::$action($configs);
    }
    function milestones($configs)
    {
        return self::getRepoResource($configs, "milestones");
    }
    function issues($configs)
    {
        return self::getRepoResource($configs, "issues");
    }
    function comments($configs)
    {
        return self::getRepoResource($configs, "issues", $_GET["issueid"], "comments");
    }
    protected function getRepoResource()
    {
        $args = func_get_args();
开发者ID:JQueryCollection,项目名称:releasenotes,代码行数:31,代码来源:api.php

示例2: function

namespace qg;

qg::on('action', function () {
    // use 'render' ? would be .5 miliseconds slower :(
    if (strpos(appRequestUri, 'dbFile/') === 0) {
        $request = substr(appRequestUri, 7);
        dbFile::output($request);
    }
    File::uploadListener();
    if (isset($_GET['qgha'])) {
        $ok = hashAction::fire($_GET['qgha']);
    }
    if (isset(G()->ASK['serverInterface'])) {
        foreach (G()->ASK['serverInterface'] as $id => $vs) {
            $ret['serverInterface'][$id] = Api::call($vs['fn'], $vs['args']);
        }
        Answer($ret);
    }
});
/*
 qg::on('deliverHtml', function() {
 		html::addJSFile(sysURL.'core/js/c1.js','core');

 		// old ie
 		$matches = preg_match('/MSIE ([0-9.]+)/',$_SERVER['HTTP_USER_AGENT'], $match);
 		if (isset($match[1]) && $match[1] < 9) {
 		html::addJSFile(sysURL.'core/js/jQuery1.js','core');
 		} else {
 		html::addJSFile(sysURL.'core/js/jQuery.js','core');
 		}
开发者ID:nikbucher,项目名称:shwups-cms-v4,代码行数:30,代码来源:qg.php

示例3: onAfter

 static function onAfter($fn, $pid)
 {
     Api::call('page::reload', array($pid));
 }
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:4,代码来源:serverInterface.php

示例4: add

		blur:add,
		focus:function() {
			this.value='';
		},
		keydown:function(e) {
			e.which==13 && add();
			if (e.which==27) {
				this.value='';
				this.blur();
			}
		}
	});
}();
</script>

<div id=cmsTreeContainer></div>

<script>
//$fn('cms::getTree')(0,{ in : <?php 
echo $Cont;
?>
 , filter : '<?php 
echo G()->SET['cms']['panel']['tree_show_c']->v ? '*' : 'p';
?>
' }).then(cmsTreeInit);
cmsTreeInit( <?php 
echo json_encode(Api::call('cms::getTree', array(0, array('in' => $Cont, 'filter' => G()->SET['cms']['panel']['tree_show_c']->v ? '*' : 'p'))));
?>
 )
</script>
<?php 
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:31,代码来源:nav.tree.php

示例5: setTxt

 static function setTxt($id, $v)
 {
     $vs = D()->row("SELECT name, page_id FROM page_text WHERE text_id = " . (int) $id . " ");
     if ($vs) {
         return Api::call('page::text', array($vs['page_id'], $vs['name'], L(), $v));
     }
     $vs = D()->row("SELECT id FROM page WHERE title_id = " . (int) $id . " ");
     if ($vs) {
         return Api::call('page::title', array($vs['id'], L(), $v));
     }
     return false;
 }
开发者ID:nikbucher,项目名称:shwups-cms-v4,代码行数:12,代码来源:serverInterface_Cms.class.php


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