Converts compiler to move component get methods to the powers area.

This commit is contained in:
2023-01-15 10:42:19 +02:00
parent e8abe8e3cf
commit f44f385159
12 changed files with 1446 additions and 1346 deletions

File diff suppressed because it is too large Load Diff

View File

@ -431,10 +431,12 @@ class Structure extends Get
$this->buildPlugins();
// set the Joomla Version Data
$this->joomlaVersionData = $this->setJoomlaVersionData();
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
CFactory::_('Event')->trigger(
'jcb_ce_onAfterSetJoomlaVersionData',
array(&$this->componentContext, &$this->joomlaVersionData)
array(&$component_context, &$this->joomlaVersionData)
);
// set the dashboard
$this->setDynamicDashboard();
@ -472,10 +474,11 @@ class Structure extends Get
{
// for plugin event TODO change event api signatures
$this->powers = CFactory::_('Power')->active;
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeSetModules
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildPowers',
array(&$this->componentContext, &$this->powers)
array(&$component_context, &$this->powers)
);
// for plugin event TODO change event api signatures
CFactory::_('Power')->active = $this->powers;
@ -590,10 +593,12 @@ class Structure extends Get
{
if (ArrayHelper::check($this->joomlaModules))
{
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeSetModules
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildModules',
array(&$this->componentContext, &$this->joomlaModules)
array(&$component_context, &$this->joomlaModules)
);
foreach ($this->joomlaModules as $module)
{
@ -877,7 +882,7 @@ class Structure extends Get
$xml = '<?xml version="1.0" encoding="utf-8"?>';
$xml .= PHP_EOL . '<!--' . Line::_(__Line__, __Class__)
. ' default paths of ' . $file
. ' form points to ' . $this->componentCodeName
. ' form points to ' . CFactory::_('Config')->component_code_name
. ' -->';
// search if we must add the component path
$add_component_path = false;
@ -1171,10 +1176,12 @@ class Structure extends Get
{
if (ArrayHelper::check($this->joomlaPlugins))
{
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeSetPlugins
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildPlugins',
array(&$this->componentContext, &$this->joomlaPlugins)
array(&$component_context, &$this->joomlaPlugins)
);
foreach ($this->joomlaPlugins as $plugin)
{
@ -1585,12 +1592,14 @@ class Structure extends Get
*/
private function setLibraries()
{
if (ArrayHelper::check($this->libraries))
if (($libraries_ = CFactory::_('Registry')->extract('builder.libraries')) !== null)
{
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeSetLibraries
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeSetLibraries',
array(&$this->componentContext, &$this->libraries)
array(&$component_context, &$libraries_)
);
// creat the main component folder
if (!Folder::exists($this->componentPath))
@ -1602,7 +1611,7 @@ class Structure extends Get
}
// create media path if not set
$this->createFolder($this->componentPath . '/media');
foreach ($this->libraries as $id => &$library)
foreach ($libraries_ as $id => &$library)
{
if (ObjectHelper::check($library))
{
@ -1722,6 +1731,8 @@ class Structure extends Get
}
}
}
// update the global value just in case for now
CFactory::_('Registry')->set("builder.libraries.$id", $library);
}
}
}
@ -2862,62 +2873,59 @@ class Structure extends Get
)
);
}
// set some defaults
$uikit = CFactory::_('Config')->get('uikit', 0);
$footable = CFactory::_('Config')->get('footable', false);
$add_eximport = CFactory::_('Config')->get('add_eximport', false);
// add custom folders
if ((isset($this->componentData->folders)
&& ArrayHelper::check(
$this->componentData->folders
))
|| $this->addEximport
|| $this->uikit
|| $this->footable)
)) || $add_eximport || $uikit || $footable)
{
if ($this->addEximport)
if ($add_eximport)
{
// move the import view folder in place
$importView = array('folder' => 'importViews',
$this->componentData->folders[] = array('folder' => 'importViews',
'path' => 'admin/views/import',
'rename' => 1);
$this->componentData->folders[] = $importView;
// move the phpspreadsheet Folder (TODO we must move this to a library package)
$PHPExcel
= array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor',
$this->componentData->folders[] = array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor',
'path' => '/libraries/phpspreadsheet/',
'rename' => 0);
$this->componentData->folders[] = $PHPExcel;
}
if (2 == $this->uikit || 1 == $this->uikit)
// set uikit
if (2 == $uikit || 1 == $uikit)
{
// move the UIKIT Folder into place
$uikit = array('folder' => 'uikit-v2',
$this->componentData->folders[] = array('folder' => 'uikit-v2',
'path' => 'media',
'rename' => 0);
$this->componentData->folders[] = $uikit;
}
if (2 == $this->uikit || 3 == $this->uikit)
if (2 == $uikit || 3 == $uikit)
{
// move the UIKIT-3 Folder into place
$uikit = array('folder' => 'uikit-v3',
$this->componentData->folders[] = array('folder' => 'uikit-v3',
'path' => 'media',
'rename' => 0);
$this->componentData->folders[] = $uikit;
}
if ($this->footable
&& (!isset($this->footableVersion)
|| 2 == $this->footableVersion))
// set footable
$footable_version = CFactory::_('Config')->get('footable_version', 2);
if ($footable && 2 == $footable_version)
{
// move the footable folder into place
$footable = array('folder' => 'footable-v2',
$this->componentData->folders[] = array('folder' => 'footable-v2',
'path' => 'media',
'rename' => 0);
$this->componentData->folders[] = $footable;
}
elseif ($this->footable && 3 == $this->footableVersion)
elseif ($footable && 3 == $footable_version)
{
// move the footable folder into place
$footable = array('folder' => 'footable-v3',
$this->componentData->folders[] = array('folder' => 'footable-v3',
'path' => 'media',
'rename' => 0);
$this->componentData->folders[] = $footable;
}
// pointer tracker
@ -3021,25 +3029,23 @@ class Structure extends Get
unset($this->componentData->folders);
unset($custom);
}
// get the google chart switch
$google_chart = CFactory::_('Config')->get('google_chart', false);
// add custom files
if ((isset($this->componentData->files)
&& ArrayHelper::check(
$this->componentData->files
))
|| $this->googlechart)
)) || $google_chart)
{
if ($this->googlechart)
if ($google_chart)
{
// move the google chart files
$googleChart = array('file' => 'google.jsapi.js',
$this->componentData->files[] = array('file' => 'google.jsapi.js',
'path' => 'media/js',
'rename' => 0);
$this->componentData->files[] = $googleChart;
$googleChart
= array('file' => 'chartbuilder.php',
$this->componentData->files[] = array('file' => 'chartbuilder.php',
'path' => 'admin/helpers',
'rename' => 0);
$this->componentData->files[] = $googleChart;
}
// pointer tracker

View File

@ -608,10 +608,11 @@ class Fields extends Structure
$dbkey = 'g';
// for plugin event TODO change event api signatures
$placeholders = CFactory::_('Placeholder')->active;
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeBuildFields
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildFields',
array(&$this->componentContext, &$dynamicFields, &$readOnly,
array(&$component_context, &$dynamicFields, &$readOnly,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$placeholders, &$langView,
&$langViews)
@ -631,7 +632,7 @@ class Fields extends Structure
// Trigger Event: jcb_ce_onAfterBuildFields
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildFields',
array(&$this->componentContext, &$dynamicFields, &$readOnly,
array(&$component_context, &$dynamicFields, &$readOnly,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$placeholders, &$langView,
&$langViews)
@ -1025,10 +1026,11 @@ class Fields extends Structure
$dbkey = 'g';
// for plugin event TODO change event api signatures
$placeholders = CFactory::_('Placeholder')->active;
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeBuildFields
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildFields',
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
array(&$component_context, &$dynamicFieldsXML, &$readOnlyXML,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$placeholders, &$langView,
&$langViews)
@ -1048,7 +1050,7 @@ class Fields extends Structure
// Trigger Event: jcb_ce_onAfterBuildFields
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildFields',
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
array(&$component_context, &$dynamicFieldsXML, &$readOnlyXML,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$placeholders, &$langView,
&$langViews)
@ -3947,6 +3949,8 @@ class Fields extends Structure
$field['order_edit']
= $this->zeroOrderFix[$nameSingleCode][(int) $field['tab']];
}
// get the default fields
$default_fields = CFactory::_('Config')->default_fields;
// now build the layout
if (StringHelper::check($tabName)
&& strtolower($tabName) != 'publishing')
@ -3971,7 +3975,7 @@ class Fields extends Structure
= $name;
}
// check if default fields were over written
if (in_array($name, $this->defaultFields))
if (in_array($name, $default_fields))
{
// just to eliminate
$this->movedPublishingFields[$nameSingleCode][$name] = $name;
@ -3979,7 +3983,7 @@ class Fields extends Structure
}
elseif ($tabName === 'publishing' || $tabName === 'Publishing')
{
if (!in_array($name, $this->defaultFields))
if (!in_array($name, $default_fields))
{
if (isset($this->newPublishingFields[$nameSingleCode][(int) $field['alignment']][(int) $field['order_edit']]))
{
@ -4021,7 +4025,7 @@ class Fields extends Structure
= $name;
}
// check if default fields were over written
if (in_array($name, $this->defaultFields))
if (in_array($name, $default_fields))
{
// just to eliminate
$this->movedPublishingFields[$nameSingleCode][$name] = $name;
@ -4045,12 +4049,10 @@ class Fields extends Structure
$decode = array('json', 'base64', 'basic_encryption',
'whmcs_encryption', 'medium_encryption', 'expert_mode');
$textareas = array('textarea', 'editor');
if (isset($this->siteFields[$view][$field])
&& ArrayHelper::check(
$this->siteFields[$view][$field]
))
if (($site_fields = CFactory::_('Registry')->
extract('builder.site_fields.' . $view . '.' . $field)) !== null)
{
foreach ($this->siteFields[$view][$field] as $codeString => $array)
foreach ($site_fields as $codeString => $site_field)
{
// get the code array
$codeArray = explode('___', (string) $codeString);
@ -4059,40 +4061,40 @@ class Fields extends Structure
// set the decoding methods
if (in_array($set, $decode))
{
if (isset($this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']])
&& isset($this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode']))
if (isset($this->siteFieldData['decode'][$site_field->site][$code][$site_field->as][$site_field->key])
&& isset($this->siteFieldData['decode'][$site_field->site][$code][$site_field->as][$site_field->key]['decode']))
{
if (!in_array(
$set,
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode']
$this->siteFieldData['decode'][$site_field->site][$code][$site_field->as][$site_field->key]['decode']
))
{
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]['decode'][]
$this->siteFieldData['decode'][$site_field->site][$code][$site_field->as][$site_field->key]['decode'][]
= $set;
}
}
else
{
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']]
= array('decode' => array($set),
$this->siteFieldData['decode'][$site_field->site][$code][$site_field->as][$site_field->key]
= array('decode' => [$set],
'type' => $type,
'admin_view' => $view);
}
}
// set the uikit checker
if ((2 == $this->uikit || 1 == $this->uikit)
if ((2 == CFactory::_('Config')->uikit || 1 == CFactory::_('Config')->uikit)
&& in_array(
$type, $textareas
))
{
$this->siteFieldData['uikit'][$array['site']][$code][$array['as']][$array['key']]
= $array;
$this->siteFieldData['uikit'][$site_field->site][$code][$site_field->as][$site_field->key]
= (array) $site_field;
}
// set the textareas checker
if (in_array($type, $textareas))
{
$this->siteFieldData['textareas'][$array['site']][$code][$array['as']][$array['key']]
= $array;
$this->siteFieldData['textareas'][$site_field->site][$code][$site_field->as][$site_field->key]
= (array) $site_field;
}
}
}
@ -4863,10 +4865,12 @@ class Fields extends Structure
}
$this->intFieldsBuilder[$nameSingleCode] .= ',"' . $name . '"';
}
// Get the default fields
$default_fields = CFactory::_('Config')->default_fields;
// set all dynamic field of this view
if ($dbSwitch && $typeName != 'category' && $typeName != 'repeatable'
&& $typeName != 'subform'
&& !in_array($name, $this->defaultFields))
&& !in_array($name, $default_fields))
{
if (!isset($this->dynamicfieldsBuilder[$nameSingleCode]))
{
@ -5188,8 +5192,8 @@ class Fields extends Structure
// add the language only for new filter option
$filter_name_asc_lang = '';
$filter_name_desc_lang = '';
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 2)
if (CFactory::_('Registry')->
get('builder.admin_filter_type.' . $nameListCode, 1) == 2)
{
// set the language strings for ascending
$filter_name_asc = $listFieldName . ' ascending';
@ -5248,8 +5252,8 @@ class Fields extends Structure
);
// add the language only for new filter option
$filter_name_select_lang = '';
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 2)
if (CFactory::_('Registry')->
get('builder.admin_filter_type.' . $nameListCode, 1) == 2)
{
// set the language strings for selection
$filter_name_select = 'Select ' . $listFieldName;
@ -5734,8 +5738,8 @@ class Fields extends Structure
public function setFieldFilterSet(&$nameSingleCode, &$nameListCode)
{
// check if this is the above/new filter option
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 2)
if (CFactory::_('Registry')->
get('builder.admin_filter_type.' . $nameListCode, 1) == 2)
{
// we first create the file
$target = array('admin' => 'filter_' . $nameListCode);
@ -5930,8 +5934,8 @@ class Fields extends Structure
public function setFieldFilterListSet(&$nameSingleCode, &$nameListCode)
{
// check if this is the above/new filter option
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 2)
if (CFactory::_('Registry')->
get('builder.admin_filter_type.' . $nameListCode, 1) == 2)
{
// keep track of all fields already added
$donelist = array('ordering' => true, 'id' => true);
@ -6437,11 +6441,11 @@ class Fields extends Structure
return $this->xmlIndent((string) $tidy, ' ', 8, true, false);
}
// set tidy waring atleast once
elseif (!$this->setTidyWarning)
// set tidy waring only once
elseif (CFactory::_('Config')->set_tidy_warning)
{
// set the warning only once
$this->setTidyWarning = true;
CFactory::_('Config')->set('set_tidy_warning', false);
// now set the warning
$this->app->enqueueMessage(
JText::_('<hr /><h3>Tidy Error</h3>'), 'Error'

File diff suppressed because it is too large Load Diff

View File

@ -82,10 +82,11 @@ class Infusion extends Interpretation
$placeholders = CFactory::_('Placeholder')->active;
$fileContentStatic = CFactory::_('Content')->active;
$fileContentDynamic = CFactory::_('Content')->_active;
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildFilesContent',
array(&$this->componentContext, &$this->componentData,
array(&$component_context, &$this->componentData,
&$fileContentStatic, &$fileContentDynamic,
&$placeholders, &$this->hhh)
);
@ -365,7 +366,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$nameSingleCode,
&$nameListCode,
&$fileContentStatic,
@ -579,7 +580,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$nameSingleCode,
&$nameListCode,
&$fileContentStatic,
@ -606,7 +607,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAdminListViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$nameSingleCode,
&$nameListCode,
&$fileContentStatic,
@ -876,7 +877,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminListViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$nameSingleCode,
&$nameListCode,
&$fileContentStatic,
@ -1021,7 +1022,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$nameSingleCode,
&$nameListCode,
&$fileContentStatic,
@ -1088,7 +1089,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildCustomAdminViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$view['settings']->code,
&$fileContentStatic,
&$fileContentDynamic[$view['settings']->code],
@ -1255,7 +1256,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildCustomAdminViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$view['settings']->code,
&$fileContentStatic,
&$fileContentDynamic[$view['settings']->code],
@ -1364,7 +1365,7 @@ class Infusion extends Interpretation
}
// add import
if (isset($this->addEximport) && $this->addEximport)
if (CFactory::_('Config')->get('add_eximport', false))
{
// setup import files
$target = array('admin' => 'import');
@ -1384,7 +1385,7 @@ class Infusion extends Interpretation
}
// ensure that the ajax model and controller is set if needed
if (isset($this->addAjax) && $this->addAjax)
if (CFactory::_('Config')->get('add_ajax', false))
{
// setup Ajax files
$target = array('admin' => 'ajax');
@ -1399,7 +1400,7 @@ class Infusion extends Interpretation
}
// ensure that the site ajax model and controller is set if needed
if (isset($this->addSiteAjax) && $this->addSiteAjax)
if (CFactory::_('Config')->get('add_site_ajax', false))
{
// setup Ajax files
$target = array('site' => 'ajax');
@ -1486,7 +1487,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildSiteViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$view['settings']->code,
&$fileContentStatic,
&$fileContentDynamic[$view['settings']->code],
@ -1680,7 +1681,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildSiteViewContent',
array(&$this->componentContext, &$view,
array(&$component_context, &$view,
&$view['settings']->code,
&$fileContentStatic,
&$fileContentDynamic[$view['settings']->code],
@ -1817,7 +1818,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onBeforeInfuseModuleData
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeInfuseModuleData',
array(&$this->componentContext, &$module, &$this)
array(&$component_context, &$module, &$this)
);
CFactory::_('Config')->build_target = $module->key;
CFactory::_('Config')->lang_target = $module->key;
@ -1870,7 +1871,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterInfuseModuleData
CFactory::_('Event')->trigger(
'jcb_ce_onAfterInfuseModuleData',
array(&$this->componentContext, &$module, &$this)
array(&$component_context, &$module, &$this)
);
}
}
@ -1885,7 +1886,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onBeforeInfusePluginData
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeInfusePluginData',
array(&$this->componentContext, &$plugin, &$this)
array(&$component_context, &$plugin, &$this)
);
CFactory::_('Config')->build_target = $plugin->key;
CFactory::_('Config')->lang_target = $plugin->key;
@ -1927,7 +1928,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterInfusePluginData
CFactory::_('Event')->trigger(
'jcb_ce_onAfterInfusePluginData',
array(&$this->componentContext, &$plugin, &$this)
array(&$component_context, &$plugin, &$this)
);
}
}
@ -1944,7 +1945,7 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterBuildFilesContent
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildFilesContent',
array(&$this->componentContext, &$this->componentData,
array(&$component_context, &$this->componentData,
&$fileContentStatic, &$this->fileContentDynamic,
&$placeholders, &$this->hhh)
);
@ -2099,10 +2100,12 @@ class Infusion extends Interpretation
$this->purgeLanuageStrings($values, CFactory::_('Config')->component_id);
// path to INI file
$getPAth = $this->templatePath . '/en-GB.com_admin.ini';
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAllLangFiles',
array(&$this->componentContext, &$this->languages['components'],
array(&$component_context, &$this->languages['components'],
&$this->langTag)
);
// for plugin event TODO change event api signatures