本文整理汇总了PHP中PackageManager::getPackages方法的典型用法代码示例。如果您正苦于以下问题:PHP PackageManager::getPackages方法的具体用法?PHP PackageManager::getPackages怎么用?PHP PackageManager::getPackages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PackageManager
的用法示例。
在下文中一共展示了PackageManager::getPackages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPackages
/**
* Retrieve a list of packages which belong to the corresponding category
*
* @param category_id this is passed via POST and is the category id of packages
* we wish to retrieve
* @return packages xml string consisting of the packages and releases which belong to
* the category
*/
function getPackages()
{
$json = getJSONobj();
$category_id = '';
if (isset($_REQUEST['category_id'])) {
$category_id = nl2br($_REQUEST['category_id']);
}
$xml = PackageManager::getPackages($category_id);
echo 'result = ' . $json->encode(array('package_output' => $xml));
}
示例2: getPackages
/**
* Retrieve a list of packages which belong to the corresponding category
*
* @param category_id this is passed via POST and is the category id of packages
* we wish to retrieve
* @return packages xml string consisting of the packages and releases which belong to
* the category
*/
function getPackages()
{
require_once 'include/json_config.php';
$json_config = new json_config();
$json = getJSONobj();
$category_id = '';
if (isset($_REQUEST['category_id'])) {
$category_id = nl2br($_REQUEST['category_id']);
}
$xml = PackageManager::getPackages($category_id);
echo 'result = ' . $json->encode(array('package_output' => $xml));
}