code: public function getAllSpContainers()
      {
          $allSpContainers = [];
  
          foreach ($this->children as $child) {
              if ($child instanceof self) {
                  $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers());
              } else {
                  $allSpContainers[] = $child;
              }
          }
  
          return $allSpContainers;
      }
docs: Recursively get all spContainers within this spgrContainer.
  
  @return SpgrContainer\SpContainer[]