Load debugger breakpoints from the storage. Returns a 2-arity array
with the debuggee id and the list of breakpoints.

@return array
@throws \RuntimeException when failed to attach to the shared memory.
437950
public function load()
    {
        $shmid = shm_attach($this->sysvKey);
        if ($shmid === false) {
            throw new \RuntimeException(
                'Failed to attach to the shared memory'
            );
        }
        if (!shm_has_var($shmid, self::VAR_KEY)) {
            $result = [null, []];
        } else {
            $result = shm_get_var($shmid, self::VAR_KEY);
        }
        return $result;
    }
559742
public function listDebuggees(array $args = [])
    {
        return $this->send([$this->debuggerClient, 'listDebuggees'], [
            $this->pluck('project', $args),
            DebuggerClient::getDefaultAgentVersion(),
            $args
        ]);
    }
728999
protected function getDumper()
    {
        if (!$this->dumper) {
            $this->dumper = new DebugBarHtmlDumper();
            $dumperOptions = $this->getDumperOptions();
            if (isset($dumperOptions['styles'])) {
                $this->dumper->setStyles($dumperOptions['styles']);
            }
        }
        return $this->dumper;
    }
5621
public function debug()
    {
        $class = static::class;
        $val = "<h3>Database record: {$class}</h3>\n<ul>\n";
        if ($this->record) {
            foreach ($this->record as $fieldName => $fieldVal) {
                $val .= "\t<li>$fieldName: " . Debug::text($fieldVal) . "</li>\n";
            }
        }
        $val .= "</ul>\n";
        return $val;
    }
293828
public function getSuccessors()
    {
        $returnValue = array();

        
    	$reflection = new ReflectionClass($this);
		foreach($reflection->getProperties() as $property){
			if(!$property->isStatic() && !$property->isPrivate()){
				$propertyName = $property->getName();
				$value = $this->$propertyName;
				if (is_array($value)) {
					foreach ($value as $key => $subvalue) {
						if (is_object($subvalue) && $subvalue instanceof self) {
								$returnValue[] = $subvalue;
						}
					}
				} elseif (is_object($value) && $value instanceof self) {
						$returnValue[] = $value;
					}
				}
		}
        

        return (array) $returnValue;
    }
251044
public function toArray()
    {
        $classData = [];
        foreach ($this->getReflector()->getProperties(\ReflectionProperty::IS_PROTECTED) as $reflectionProperty) {
            if (!$reflectionProperty->isStatic()) {
                $reflectionProperty->setAccessible(true);
                $classData[$reflectionProperty->getName()] = $reflectionProperty->getValue($this);
            }
        }
        return $classData;
    }
757899
public function toArray()
    {
        $errorInfo['code'] = $this->getCode();
        $errorInfo['context'] = $this->getContext();
        $errorInfo['message'] = htmlentities($this->getMessage());

        if (config('app.debug', false)) {
            $trace = $this->getTraceAsString();
            $trace = str_replace(["\n", "#"], ["", "<br>"], $trace);
            $traceArray = explode("<br>", $trace);
            $cleanTrace = [];
            foreach ($traceArray as $k => $v) {
                if (!empty($v)) {
                    $cleanTrace[] = $v;
                }
            }
            $errorInfo['trace'] = $cleanTrace;
        }

        return $errorInfo;
    }
634967
protected function getDefaultParameters(): array
	{
		$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
		$last = end($trace);
		$debugMode = static::detectDebugMode();

		return [
			'appDir' => isset($trace[2]['file']) ? dirname($trace[2]['file']) : null,
			'wwwDir' => isset($last['file']) ? dirname($last['file']) : null,
			'debugMode' => $debugMode,
			'productionMode' => !$debugMode,
			'consoleMode' => PHP_SAPI === 'cli',
		];
	}
1066041
public function getSpeakers(): array
    {
        if (is_array($this->speakers)) {
            return $this->speakers;
        }

        $devices = $this->collection->getDevices();
        if (count($devices) < 1) {
            throw new \RuntimeException("No devices in this collection");
        }

        $this->getLogger()->info("creating speaker instances");

        $this->speakers = [];
        foreach ($devices as $device) {
            if (!$device->isSpeaker()) {
                continue;
            }

            $speaker = new Speaker($device);

            try {
                $speaker->getGroup();
            } catch (UnknownGroupException $e) {
                continue;
            }

            $this->speakers[$device->getIp()] = $speaker;
        }

        return $this->speakers;
    }
121892
public function getData(): array
    {
        $combined = $this->getDelegated()->getData();
        foreach (parent::getData() as $key => $value) {
            if (!array_key_exists($key, $combined)) {
                $combined[$key] = $value;
                continue;
            }
            if (\is_array($value)) {
                if (!is_array($combined[$key])) {
                    throw new \RuntimeException('Can not merge key "' . $key . '", parent value is not an array.');
                }

                /** @noinspection SlowArrayOperationsInLoopInspection - can not optimize here */
                $combined[$key] = array_merge($combined[$key], $value);
                continue;
            }

            $combined[$key] = $value;
        }

        return $combined;
    }
651389
public function getFunctions()
    {
        // dump is safe if var_dump is overridden by xdebug
        $isDumpOutputHtmlSafe = extension_loaded('xdebug')
            // false means that it was not set (and the default is on) or it explicitly enabled
            && (false === ini_get('xdebug.overload_var_dump') || ini_get('xdebug.overload_var_dump'))
            // false means that it was not set (and the default is on) or it explicitly enabled
            // xdebug.overload_var_dump produces HTML only when html_errors is also enabled
            && (false === ini_get('html_errors') || ini_get('html_errors'))
            || 'cli' === php_sapi_name()
        ;

        return array(
            new Twig_SimpleFunction('dump', 'twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)),
        );
    }
1223082
protected final function getPoolDebugInfo()
	{
		return [
			'debug'              => $this->debug ? 1 : 0,
			'size'               => $this->size,
			'max_size'           => $this->maxSize,
			'being_created_size' => $this->beingCreatedSize,
			'max_uuid'           => $this->uuid,
			'idle_count'         => $this->idleQueue->count(),
			'task_count'         => $this->taskQueue->count(),
			'average_idle'       => $this->averageIdle,
			'gc'                 => $this->gc,
		];
	}
164428
protected function load()
    {
        $data = array();

        /** @var LoaderInterface $loader */
        foreach ($this->loaders as $loader) {
            try {
                $data = array_merge($data, $loader->load());

                if ($loader->stopPropagation()) {
                    break;
                }
            } catch (LoaderException $e) {
                $this->getLogger()->error($e->getMessage());
            }
        }

        return $data;
    }
278555
public function getData()
    {
        if (!$this->enabled()) {
            return null;
        }

        $this->addDeprecations();
        $this->timers = [];

        return $this->debugbar->getData();
    }
778134
public function debug()
    {
        // call TransformationMixin functions
        $json_response = $this->sendDebug($this->transform_url,
            $this->api_key, $this->security);

        return $json_response;
    }
818923
protected function getFields(): array {
    if (!$this->fields) {
      // Search the pattern for named subpatterns and get their names.
      // @link https://stackoverflow.com/a/47753964/3260408
      preg_match_all("~(?<!\\\\)(?:\\\\{2})*\(\?(?|P?<([_A-Za-z]\w{0,31})>|'([_A-Za-z]\w{0,31})')~", $this->getPattern(), $matches);
      $this->fields = $matches[1];

      if (!$this->fields) {
        throw new \RuntimeException('Pattern must contain named subpatterns.');
      }
      if (count(array_unique($this->fields)) != count($this->fields)) {
        throw new \RuntimeException('Subpattern names must be unique.');
      }
    }

    return $this->fields;
  }
188049
protected static function get_core_eventlist() {
        global $CFG;

        // Disable developer debugging as deprecated events will fire warnings.
        // Setup backup variables to restore the following settings back to what they were when we are finished.
        $debuglevel          = $CFG->debug;
        $debugdisplay        = $CFG->debugdisplay;
        $debugdeveloper      = $CFG->debugdeveloper;
        $CFG->debug          = 0;
        $CFG->debugdisplay   = false;
        $CFG->debugdeveloper = false;

        $eventinformation = array();
        $directory = $CFG->libdir . '/classes/event';
        $files = self::get_file_list($directory);

        // Remove exceptional events that will cause problems being displayed.
        if (isset($files['unknown_logged'])) {
            unset($files['unknown_logged']);
        }
        foreach ($files as $file => $location) {
            $classname = '\\core\\event\\' . $file;
            // Check to see if this is actually a valid event.
            if (method_exists($classname, 'get_static_info')) {
                $ref = new \ReflectionClass($classname);
                // Ignore abstracts.
                if (!$ref->isAbstract() && $file != 'manager') {
                    $eventinformation[$classname] = $classname::get_name_with_info();
                }
            }
        }
        // Now enable developer debugging as event information has been retrieved.
        $CFG->debug          = $debuglevel;
        $CFG->debugdisplay   = $debugdisplay;
        $CFG->debugdeveloper = $debugdeveloper;
        return $eventinformation;
    }