public function getOperations($domain = null)
    {
        if (!is_null($domain) && !isset($this->opsByDomain[$domain])) {
            return [];
        } elseif (!is_null($domain)) {
            return $this->opsByDomain[$domain];
        }

        return $this->allOperations;
    }