本文整理汇总了PHP中KalturaPluginManager::addPlugin方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaPluginManager::addPlugin方法的具体用法?PHP KalturaPluginManager::addPlugin怎么用?PHP KalturaPluginManager::addPlugin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KalturaPluginManager
的用法示例。
在下文中一共展示了KalturaPluginManager::addPlugin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
if ($include !== null) {
$exclude = null;
}
// get the list of Objects to include in this client generate
$additional = $item->get("additional");
// get the list of Objects to ignore
$ignore = $item->get("ignore");
// get the list of Plugins to include in this client generate
$pluginList = explode(',', $item->get("plugins"));
// include the plugins requested for this package
foreach ($pluginList as $plugin) {
$pluginName = trim($plugin);
if (!$pluginName) {
continue;
}
KalturaPluginManager::addPlugin($pluginName);
}
// create the API schema to be used by the generator
$reflectionClass = new ReflectionClass($generator);
$fromXml = $reflectionClass->isSubclassOf("ClientGeneratorFromXml");
$fromPhp = $reflectionClass->isSubclassOf("ClientGeneratorFromPhp");
// if it's an XML schema based generator -
if ($fromXml) {
KalturaLog::info("Using XmlSchemaGenerator to generate the api schema");
if ($useReadySchema == null || $useReadySchema == '') {
KalturaLog::info("Using code introspection to generate XML schema");
$xmlGenerator = new XmlClientGenerator();
$xmlGenerator->setIncludeOrExcludeList($include, $exclude, $excludePaths);
$xmlGenerator->setIgnoreList($ignore);
$xmlGenerator->setAdditionalList($additional);
$xmlGenerator->generate();
示例2: die
// ---------------------------------------------------------------------------
$xsltFilePath = '';
//TODO: change to valid xslt file path
$metadataProfileId = null;
//TODO: change to a valid metadata profile id
// ---------------------------------------------------------------------------
if (!$xsltFilePath) {
die('ERROR - Missing parameter [$xsltFilePath]' . PHP_EOL);
}
if (!$metadataProfileId) {
die('ERROR - Missing parameter [$metadataProfileId]' . PHP_EOL);
}
if (!file_exists($xsltFilePath)) {
die('ERROR - Cannot find file at [' . $xsltFilePath . ']' . PHP_EOL);
}
require_once dirname(__FILE__) . '/../bootstrap.php';
require_once dirname(__FILE__) . '/../../api_v3/bootstrap.php';
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "metadata", "*"));
KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . '/scripts/' . basename(__FILE__) . '.cache');
KAutoloader::register();
KalturaPluginManager::addPlugin('MetadataPlugin');
$dbMetadataProfile = MetadataProfilePeer::retrieveById($metadataProfileId);
if (!$dbMetadataProfile) {
die('ERROR - Cannot find metadata profile with id [' . $metadataProfileId . ']' . PHP_EOL);
}
$dbMetadataProfile->incrementXsltVersion();
$dbMetadataProfile->save();
$key = $dbMetadataProfile->getSyncKey(MetadataProfile::FILE_SYNC_METADATA_XSLT);
kFileSyncUtils::moveFromFile($xsltFilePath, $key, true, true);
echo 'Done' . PHP_EOL;
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:31,代码来源:syncXsltOnMetadataProfile.php
示例3: basename
<?php
require_once __DIR__ . '/../../../../alpha/scripts/bootstrap.php';
if ($argc != 4) {
echo "Arguments missing." . PHP_EOL . PHP_EOL;
echo 'Usage: php ' . __FILE__ . ' {partner id} {edgecast account number} {api token}' . PHP_EOL;
die;
}
$partnerId = $argv[1];
$accountNumber = $argv[2];
$apiToken = $argv[3];
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "edgecast", "*"));
KAutoloader::setClassMapFilePath(KALTURA_ROOT_PATH . '/cache/scripts/' . basename(__FILE__) . '.cache');
KAutoloader::register();
KalturaPluginManager::addPlugin('EdgeCastPlugin');
$partner = PartnerPeer::retrieveByPK($partnerId);
if (!$partner) {
die("No partner with ID [{$partnerId}]." . PHP_EOL);
}
$edgeCastParams = new kEdgeCastParams();
$edgeCastParams->setAccountNumber($accountNumber);
$edgeCastParams->setApiToken($apiToken);
EdgeCastPlugin::setEdgeCastParams($partner, $edgeCastParams);
$partner->save();
echo "Done.";