Debugger/src/Breakpoint.php
public function addStackFrame($stackFrameData)
    {
        $stackFrameData += [
            'function' => '',
            'locals' => []
        ];

        $sf = new StackFrame(
            $stackFrameData['function'],
            new SourceLocation($stackFrameData['filename'], $stackFrameData['line'])
        );

        foreach ($stackFrameData['locals'] as $local) {
            if ($this->variableTable->isFull()) {
                break;
            }
            $value = isset($local['value']) ? $local['value'] : null;
            $hash = isset($local['id']) ? $local['id'] : null;
            try {
                $variable = $this->addVariable($local['name'], $value, $hash);
            } catch (BufferFullException $e) {
                $sf->addLocal($this->variableTable->bufferFullVariable());
                break;
            }
            $sf->addLocal($variable);
        }

        array_push($this->stackFrames, $sf);
    }
public function addStackFrame($stackFrameData)
    {
        $stackFrameData += [
            'function' => '',
            'locals' => []
        ];

        $sf = new StackFrame(
            $stackFrameData['function'],
            new SourceLocation($stackFrameData['filename'], $stackFrameData['line'])
        );

        foreach ($stackFrameData['locals'] as $local) {
            if ($this->variableTable->isFull()) {
                break;
            }
            $value = isset($local['value']) ? $local['value'] : null;
            $hash = isset($local['id']) ? $local['id'] : null;
            try {
                $variable = $this->addVariable($local['name'], $value, $hash);
            } catch (BufferFullException $e) {
                $sf->addLocal($this->variableTable->bufferFullVariable());
                break;
            }
            $sf->addLocal($variable);
        }

        array_push($this->stackFrames, $sf);
    }
public function addStackFrame ( $ stackFrameData ) { $ stackFrameData += [ 'function' => '' , 'locals' => [ ] ] ; $ sf = new StackFrame ( $ stackFrameData [ 'function' ] , new SourceLocation ( $ stackFrameData [ 'filename' ] , $ stackFrameData [ 'line' ] ) ) ; foreach ( $ stackFrameData [ 'locals' ] as $ local ) { if ( $ this -> variableTable -> isFull ( ) ) { break ; } $ value = isset ( $ local [ 'value' ] ) ? $ local [ 'value' ] : null ; $ hash = isset ( $ local [ 'id' ] ) ? $ local [ 'id' ] : null ; try { $ variable = $ this -> addVariable ( $ local [ 'name' ] , $ value , $ hash ) ; } catch ( BufferFullException $ e ) { $ sf -> addLocal ( $ this -> variableTable -> bufferFullVariable ( ) ) ; break ; } $ sf -> addLocal ( $ variable ) ; } array_push ( $ this -> stackFrames , $ sf ) ; }
Add single stackframe of data to this breakpoint.

Example:
```
$breakpoint->addStackFrame([
'filename' => '/path/to/file.php',
'line' => 10
]);
$stackFrames = $breakpoint->stackFrames();
```

@param array $stackFrameData {
Stackframe information.

@type string $function The name of the function executed.
@type string $filename The name of the file executed.
@type int $line The line number of the file executed.
@type array $locals Captured local variables.
Add single stackframe of data to this breakpoint .