AppserverIo\Appserver\Core\Traits\ThreadedContextTrait::getAttributes PHP Method

getAttributes() public method

All values registered in the context.
public getAttributes ( ) : array
return array The context data
    public function getAttributes()
    {
        // initialize the array with the attributes
        $attributes = array();
        // prepare the pattern to filter the attributes
        $pattern = sprintf('%s-*', $this->getSerial());
        // prepare the array with the attributes
        foreach ($this as $key => $value) {
            if (fnmatch($pattern, $key)) {
                $attributes[$key] = $value;
            }
        }
        // return the attributes
        return $attributes;
    }