/** * Gets the service identifier. * * @return KServiceIdentifier * @see KObjectServiceable */ public final function getIdentifier($identifier = null) { if (isset($identifier)) { $result = $this->__service_container->getIdentifier($identifier); } else { $result = $this->__service_identifier; } return $result; }
/** * Check for overrides of the helper * * @param object An optional KConfig object with configuration options * @param object A KServiceInterface object * @return ComActivitiesTemplateHelperActivity */ public static function getInstance(KConfigInterface $config, KServiceInterface $container) { $identifier = clone $config->service_identifier; $identifier->package = $config->row->package; $identifier = $container->getIdentifier($identifier); if (file_exists($identifier->filepath)) { $classname = $identifier->classname; } else { $classname = $config->service_identifier->classname; } $instance = new $classname($config); return $instance; }
public static function getInstance(KConfigInterface $config, KServiceInterface $container) { $identifier = clone $config->service_identifier; if ($config->data && $config->data->identifier) { $id = new KServiceIdentifier($config->data->identifier); if ($id->type === 'com') { $identifier->package = $id->package; } } $identifier = $container->getIdentifier($identifier); if ($identifier->classname != 'KDatabaseRowDefault' && class_exists($identifier->classname)) { $classname = $identifier->classname; } else { $classname = 'ComExtmanDatabaseRowExtension'; } $instance = new $classname($config); return $instance; }