renoki-co/php-k8s

View on GitHub
src/Traits/Resource/HasSelector.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace RenokiCo\PhpK8s\Traits\Resource;

trait HasSelector
{
    /**
     * Set the selectors.
     *
     * @param  array  $selectors
     * @return $this
     */
    public function setSelectors(array $selectors = [])
    {
        return $this->setSpec('selector', $selectors);
    }

    /**
     * Get the selectors.
     *
     * @return array
     */
    public function getSelectors(): array
    {
        return $this->getSpec('selector', []);
    }
}