Exemplo n.º 1
0
}
//pass the name of the generator as the first argument of the command line to
//generate a single library. if this argument is empty or 'all', generator will create all libs.
$generateSingle = isset($argv[1]) ? $argv[1] : null;
//second command line argument specifies the output path, if not specified will default to
//<content root>/content/clientlibs
if (isset($argv[2])) {
    $outputPathBase = $argv[2];
} else {
    $root = myContentStorage::getFSContentRootPath();
    $outputPathBase = "{$root}/content/clientlibs";
}
kFile::fullMkdir($outputPathBase);
//pull the generator config ini
$config = new Zend_Config_Ini(__DIR__ . '/../configurations/generator.ini', null, array('allowModifications' => true));
$config = KalturaPluginManager::mergeConfigs($config, 'generator', false);
$libsToGenerate = null;
if (strtolower($generateSingle) == 'all') {
    $generateSingle = null;
} elseif (!$generateSingle) {
    $libsToGenerate = file(__DIR__ . '/../configurations/generator.defaults.ini');
    foreach ($libsToGenerate as $key => &$default) {
        $default = strtolower(trim($default, " \t\r\n"));
    }
}
//if we got specific generator request, tes if this requested generator does exist
if ($generateSingle != null) {
    $libsToGenerate = array_map('strtolower', array_intersect(explode(',', $generateSingle), array_keys($config->toArray())));
}
//get the API version
$apiVersion = KALTURA_API_VERSION;
Exemplo n.º 2
0
 protected function _initConfig()
 {
     $this->bootstrap('autoloaders');
     $this->bootstrap('log');
     $this->bootstrap('plugins');
     $config = $this->getConfig();
     $configSettings = $config->settings;
     $configName = $configSettings->applicationName;
     $config = KalturaPluginManager::mergeConfigs($config, $configName, false);
     Zend_Registry::set('config', $config);
     return $config;
 }
Exemplo n.º 3
0
<?php

function compareTypeNames($obj1, $obj2)
{
    return strcmp($obj1->getType(), $obj2->getType());
}
function compareServiceNames($obj1, $obj2)
{
    return strcmp($obj1->serviceId, $obj2->serviceId);
}
$config = new Zend_Config_Ini("../../config/testme.ini", null, array('allowModifications' => true));
$config = KalturaPluginManager::mergeConfigs($config, 'testme', false);
$indexConfig = $config->get('testmedoc');
$include = $indexConfig->get("include");
$exclude = $indexConfig->get("exclude");
$excludePaths = $indexConfig->get("excludepaths");
$additional = $indexConfig->get("additional");
$clientGenerator = new DummyForDocsClientGenerator();
$clientGenerator->setIncludeOrExcludeList($include, $exclude, $excludePaths);
echo $include;
$clientGenerator->setAdditionalList($additional);
$clientGenerator->load();
$list = array();
$services = $clientGenerator->getServices();
foreach ($services as $serviceId => $serviceReflector) {
    /* @var $serviceReflector KalturaServiceActionItem */
    $actions = $serviceReflector->actionMap;
    foreach ($actions as $actionId => &$actionCallback) {
        // we need only the keys
        $actionCallback = null;
    }
Exemplo n.º 4
0
<?php

$config = new Zend_Config_Ini("../../config/testme.ini", null, array('allowModifications' => true));
$config = KalturaPluginManager::mergeConfigs($config, 'xsddoc', false);
$indexConfig = $config->get('xsddoc');
$exclude = explode(',', $indexConfig->get("exclude"));
$schemaReflector = KalturaTypeReflectorCacher::get('KalturaSchemaType');
$schemas = $schemaReflector->getConstants();
?>
<div class="left">
	<div class="left-content">
		<div id="general">
			<h2>General</h2>
			<ul>
				<li><a href="?page=overview">Overview</a></li>
			</ul>
		</div>

		<div id="schemas">
			<h2>Schemas</h2>
			<ul class="schemas">
			<?php 
foreach ($schemas as $schema) {
    ?>
				<li class="schema">
					<a href="?type=<?php 
    echo $schema->getDefaultValue();
    ?>
"><?php 
    echo $schema->getDescription();
    ?>