Respect\Validation\Exceptions\NestedValidationException::getRelated PHP Method

getRelated() public method

public getRelated ( ) : SplObjectStorage
return SplObjectStorage
    public function getRelated()
    {
        if (!$this->exceptions instanceof SplObjectStorage) {
            $this->exceptions = new SplObjectStorage();
        }
        return $this->exceptions;
    }

Usage Example

 public function __construct(NestedValidationException $parent)
 {
     $this->exceptions = $parent->getRelated();
 }