@param string $componentName
@param string $propsString
@param string $uuid
@param array  $registeredStores
@param bool   $trace

@return array
774315
public function render($componentName, $propsString, $uuid, $registeredStores = array(), $trace)
    {
        if (strpos($this->serverSocketPath, '://') === false) {
            $this->serverSocketPath = 'unix://'.$this->serverSocketPath;
        }

        if (!$sock = stream_socket_client($this->serverSocketPath, $errno, $errstr)) {
            throw new \RuntimeException($errstr);
        }
        stream_socket_sendto($sock, $this->wrap($componentName, $propsString, $uuid, $registeredStores, $trace)."\0");

        $contents = '';

        while (!feof($sock)) {
            $contents .= fread($sock, 8192);
        }
        fclose($sock);

        $result = json_decode($contents, true);
        if ($result['hasErrors']) {
            $this->logErrors($result['consoleReplayScript']);
            if ($this->failLoud) {
                $this->throwError($result['consoleReplayScript'], $componentName);
            }
        }

        return [
            'evaluated' => $result['html'],
            'consoleReplay' => $result['consoleReplayScript'],
            'hasErrors' => $result['hasErrors']
        ];
    }
1142104
public void putComponent(String serviceClass,
      String serviceName,
      String componentName,
      ServiceRecord record) throws IOException {
    String path = RegistryUtils.componentPath(
        user, serviceClass, serviceName, componentName);
    registryOperations.mknode(RegistryPathUtils.parentOf(path), true);
    registryOperations.bind(path, record, BindFlags.OVERWRITE);
  }
489835
private Multimap<String, PropertyDto> loadComponentSettings(DbSession dbSession, Optional<String> key, ComponentDto component) {
    List<String> componentUuids = DOT_SPLITTER.splitToList(component.moduleUuidPath());
    List<ComponentDto> componentDtos = dbClient.componentDao().selectByUuids(dbSession, componentUuids);
    Set<Long> componentIds = componentDtos.stream().map(ComponentDto::getId).collect(Collectors.toSet());
    Map<Long, String> uuidsById = componentDtos.stream().collect(Collectors.toMap(ComponentDto::getId, ComponentDto::uuid));
    List<PropertyDto> properties = key.isPresent() ? dbClient.propertiesDao().selectPropertiesByKeysAndComponentIds(dbSession, Collections.singleton(key.get()), componentIds)
      : dbClient.propertiesDao().selectPropertiesByComponentIds(dbSession, componentIds);

    Multimap<String, PropertyDto> propertyDtosByUuid = TreeMultimap.create(Ordering.explicit(componentUuids), Ordering.arbitrary());
    for (PropertyDto propertyDto : properties) {
      Long componentId = propertyDto.getResourceId();
      String componentUuid = uuidsById.get(componentId);
      propertyDtosByUuid.put(componentUuid, propertyDto);
    }
    return propertyDtosByUuid;
  }
680425
static public function uuid($value, $message = null, $propertyPath = null)
        {
            $value = str_replace(
                array(
                    'urn:',
                    'uuid:',
                    '{', '}'
                ),
                '',
                $value
            );

            if ($value === '00000000-0000-0000-0000-000000000000') {
                return;
            }

            if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-5][0-9A-Fa-f]{3}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
                $message = $message ?: sprintf(
                    'Value "%s" is not a valid UUID.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_UUID, $propertyPath);
            }
        }
356282
public function load($schema_shortname, $component_class = 'PatternBuilder\Property\Component\Component')
    {
        $cid = $this->getCid($schema_shortname);
        if ($this->use_cache && $cache = $this->getCache($cid)) {
            return clone $cache;
        } else {
            if (empty($this->schemaFiles)) {
                $this->schemaFiles = $this->getSchemaFiles();
            }

            if (!isset($this->schemaFiles[$schema_shortname])) {
                $message = sprintf('JSON shortname of %s was not found.', $schema_shortname);
                $this->logger->error($message);

                return false;
            }

            // Loading is limited to this branch of the IF to limit disk IO
            if ($json = $this->loadSchema($this->schemaFiles[$schema_shortname])) {
                $schema_path = $this->schemaFiles[$schema_shortname];
                $component = new $component_class($json, $this->configuration, $schema_shortname, $schema_path);
                $this->setCache($cid, $component);

                return $component;
            } else {
                return false;
            }
        }
    }
462814
private function getIncidents($componentId = null, $unresolvedOnly = true)
    {
        $incidents = [];
        if ($this->isConfigured()) {
            $clientIdKey = $this->getClientIdKey();
            $cacheKey    = 'statuspageIncidents'.$this->keys[$clientIdKey];
            $cacheExpire = 10;
            if (!$incidents = $this->cache->get($cacheKey, $cacheExpire)) {
                $clientSKey = $this->getClientSecretKey();
                $state      = $this->getAuthLoginState();
                $url        = $this->getAuthenticationUrl();
                if ($unresolvedOnly) {
                    $url .= 'pages/'.$this->keys[$clientIdKey].'/incidents/unresolved.json';
                } else {
                    $url .= 'pages/'.$this->keys[$clientIdKey].'/incidents.json';
                }
                $url .= '?api_key='.$this->keys[$clientSKey]
                    .'&response_type=code'
                    .'&state='.$state;
                $incidents = $this->makeRequest($url, ['ignore_event_dispatch' => true]);
                if (is_array($incidents) && count($incidents)) {
                    $this->cache->set($cacheKey, $incidents, $cacheExpire);
                }
            }
        }
        // Narrow down to just the affected component if specified.
        if ($incidents && $componentId) {
            $affected = [];
            foreach ($incidents as $incident) {
                if (!empty($incident['incident_updates'])) {
                    foreach ($incident['incident_updates'] as $update) {
                        if (!empty($update['affected_components'])) {
                            foreach ($update['affected_components'] as $component) {
                                if (!empty($component['code']) && $component['code'] === $componentId) {
                                    $affected[] = $incident;
                                    continue;
                                }
                            }
                        }
                    }
                }
            }
            $incidents = $affected;
        }

        return $incidents;
    }
1220814
static void registerTraceComponent(TraceComponent tc) {
        tc.setTraceSpec(activeTraceSpec);

        TrService activeDelegate = TrConfigurator.getDelegate();
        activeDelegate.register(tc);

        TrConfigurator.traceComponentRegistered(tc);

        // Add the new TraceComponent to the queue of new trace components
        newTracecomponents.add(tc);
        processNewTraceComponents();
        // There is a tiny window where the new trace component never gets processed,
        // however that isn't a problem as we only care that the set is correct is at the
        // beginning of our setTraceSpec method and it does process the list first
    }
1146454
private function readPage($propertyName, NodeInterface $node)
    {
        $pagePropertyName = $propertyName . '-page';
        if (!$node->hasProperty($pagePropertyName)) {
            return;
        }

        try {
            $pageUuid = $node->getPropertyValue($pagePropertyName, PropertyType::STRING);
        } catch (ItemNotFoundException $exception) {
            return;
        }

        return [
            'uuid' => $pageUuid,
            'path' => $node->getPropertyValueWithDefault($pagePropertyName . '-path', ''),
            'webspace' => $node->getPropertyValueWithDefault($pagePropertyName . '-webspace', null),
        ];
    }
1183260
static function inspectSet (array $components = null, $deep = false, $nested = false)
  {
    if (!$components || self::$inspecting)
      return '';
    self::$inspecting   = true;
    self::$recursionMap = new SplObjectStorage;
    ob_start ();
    foreach ($components as $component)
      self::_inspect ($component, $deep);
    self::$inspecting = false;
    return $nested ? ob_get_clean () : "<code>" . ob_get_clean () . "</code>";
  }
65041
static void traceComponentRegistered(TraceComponent tc) {
        for (TraceComponentChangeListener listener : registeredListeners.get()) {
            listener.traceComponentRegistered(tc);
        }
    }
889186
private function getTransitions( common_configuration_Component $component)
    {
        $returnValue = array();

        
    	$dependencies = $this->dependencies;
    	foreach($dependencies as $d){
    		if ($d['component'] === $component){
    			array_push($returnValue, $d);
    		}
    	}
        

        return (array) $returnValue;
    }
164698
public static function RegisterActiveVariantForSpot($sSpotName, $sParentId, $sShopVariantArticleId)
    {
        if (!array_key_exists(TdbShop::SESSION_ACTIVE_VARIANT_ARRAY, $_SESSION)) {
            $_SESSION[TdbShop::SESSION_ACTIVE_VARIANT_ARRAY] = array();
        }
        if (!array_key_exists($sSpotName, $_SESSION[TdbShop::SESSION_ACTIVE_VARIANT_ARRAY])) {
            $_SESSION[TdbShop::SESSION_ACTIVE_VARIANT_ARRAY][$sSpotName] = array();
        }
        $_SESSION[TdbShop::SESSION_ACTIVE_VARIANT_ARRAY][$sSpotName][$sParentId] = $sShopVariantArticleId;
    }
52262
public function callComponent($componentName)
    {
        if (!isset($this->components[$componentName])) {
            $requiredInterface = isset(static::$defaultComponents[$componentName][1])
                ? static::$defaultComponents[$componentName][1]
                : null;
            $componentConfig = isset(static::$defaultComponents[$componentName][2])
                ? static::$defaultComponents[$componentName][2]
                : [];
            if (isset($this->config['components'][$componentName])){
                $componentConfig = array_merge($componentConfig, $this->config['components'][$componentName]);
            }
            if (isset($componentConfig['class'])) {
                $componentClassName = $componentConfig['class'];
            } else {
                $componentClassName = isset(static::$defaultComponents[$componentName][0])
                    ? static::$defaultComponents[$componentName][0]
                    : null;
            }
            unset($this->config['components'][$componentName]);
            if (isset($componentConfig['class']))
            unset($componentConfig['class']);
            if ($componentClassName) {
                $instance = new $componentClassName($componentConfig, $this);
                if (null === $requiredInterface || ($instance instanceof $requiredInterface)) {
                    $this->components[$componentName] = $instance;
                } else {
                    throw new InvalidInterfaceException([$componentName, $componentClassName, $requiredInterface]);
                }
            } else {
                throw new UnknownComponentException($componentName);
            }
        }
        return $this->components[$componentName];
    }
620962
function capture (instance, index, list) {
  if (process.env.NODE_ENV !== 'production') {
    captureCount++
  }

  if (instance.$options && instance.$options.abstract && instance._vnode && instance._vnode.componentInstance) {
    instance = instance._vnode.componentInstance
  }

  // Functional component.
  if (instance.fnContext && !instance.componentInstance) {
    const contextUid = instance.fnContext.__VUE_DEVTOOLS_UID__
    let id = functionalIds.get(contextUid)
    if (id == null) {
      id = 0
    } else {
      id++
    }
    functionalIds.set(contextUid, id)
    const functionalId = contextUid + ':functional:' + id
    markFunctional(functionalId, instance)
    return {
      id: functionalId,
      functional: true,
      name: getInstanceName(instance),
      renderKey: getRenderKey(instance.key),
      children: (instance.children ? instance.children.map(
        child => child.fnContext
          ? captureChild(child)
          : child.componentInstance
            ? capture(child.componentInstance)
            : undefined
      )
        // router-view has both fnContext and componentInstance on vnode.
        : instance.componentInstance ? [capture(instance.componentInstance)] : []).filter(Boolean),
      inactive: false,
      isFragment: false // TODO: Check what is it for.
    }
  }
  // instance._uid is not reliable in devtools as there
  // may be 2 roots with same _uid which causes unexpected
  // behaviour
  instance.__VUE_DEVTOOLS_UID__ = getUniqueId(instance)

  // Dedupe
  if (captureIds.has(instance.__VUE_DEVTOOLS_UID__)) {
    return
  } else {
    captureIds.set(instance.__VUE_DEVTOOLS_UID__, undefined)
  }

  mark(instance)
  const name = getInstanceName(instance)

  const ret = {
    uid: instance._uid,
    id: instance.__VUE_DEVTOOLS_UID__,
    name,
    renderKey: getRenderKey(instance.$vnode ? instance.$vnode['key'] : null),
    inactive: !!instance._inactive,
    isFragment: !!instance._isFragment,
    children: instance.$children
      .filter(child => !child._isBeingDestroyed)
      .map(capture)
      .filter(Boolean)
  }

  if (instance._vnode && instance._vnode.children) {
    ret.children = ret.children.concat(
      flatten(instance._vnode.children.map(captureChild))
        .filter(Boolean)
    )
  }

  // record screen position to ensure correct ordering
  if ((!list || list.length > 1) && !instance._inactive) {
    const rect = getInstanceOrVnodeRect(instance)
    ret.top = rect ? rect.top : Infinity
  } else {
    ret.top = Infinity
  }
  // check if instance is available in console
  const consoleId = consoleBoundInstances.indexOf(instance.__VUE_DEVTOOLS_UID__)
  ret.consoleId = consoleId > -1 ? '$vm' + consoleId : null
  // check router view
  const isRouterView2 = instance.$vnode && instance.$vnode.data.routerView
  if (instance._routerView || isRouterView2) {
    ret.isRouterView = true
    if (!instance._inactive && instance.$route) {
      const matched = instance.$route.matched
      const depth = isRouterView2
        ? instance.$vnode.data.routerViewDepth
        : instance._routerView.depth
      ret.matchedRouteSegment =
        matched &&
        matched[depth] &&
        (isRouterView2 ? matched[depth].path : matched[depth].handler.path)
    }
  }
  return ret
}
250554
protected function initComponents($componentNames) {
		$components = array();
		foreach($componentNames as $name) {
			$className = sprintf("EventRegistration\Calculator\%sComponent", $name);
			array_push($components, \Injector::inst()->create($className, $this->registration));
		}
		return $components;
	}
301330
public void writeStartComponent(String componentName) throws IOException {
		if (generator == null) {
			init();
		}

		componentEnded = false;

		if (!stack.isEmpty()) {
			Info parent = stack.getLast();
			if (!parent.wroteEndPropertiesArray) {
				generator.writeEndArray();
				parent.wroteEndPropertiesArray = true;
			}
			if (!parent.wroteStartSubComponentsArray) {
				generator.writeStartArray();
				parent.wroteStartSubComponentsArray = true;
			}
		}

		generator.writeStartArray();
		generator.writeString(componentName);
		generator.writeStartArray(); //start properties array

		stack.add(new Info());
	}
901901
private static function _output($componentClass, $model, $maxComponentLength)
    {
        static $stack = array();
        array_push($stack, $componentClass);
        $rows = $model->fetchAll(array('parent' => $componentClass));
        foreach ($rows as $row) {
            echo str_repeat(' ', count($stack)*2).$row->component;
            echo str_repeat(' ', $maxComponentLength-strlen($row->component));
            echo " ($row->name)";
            if (in_array($row->component, $stack)) {
                echo " (--recursion--)\n";
            } else {
                echo "\n";
                self::_output($row->component, $model, $maxComponentLength);
            }
        }
        array_pop($stack);
    }