src/DoctrineStaticMeta.php
public function getSetters(): array
    {
        if (null !== $this->setters) {
            return $this->setters;
        }
        $skip            = [
            'addPropertyChangedListener'     => true,
            'setEntityCollectionAndNotify'   => true,
            'addToEntityCollectionAndNotify' => true,
            'setEntityAndNotify'             => true,
        ];
        $this->setters   = [];
        $reflectionClass = $this->getReflectionClass();
        foreach ($reflectionClass->getMethods(
            \ReflectionMethod::IS_PRIVATE | \ReflectionMethod::IS_PUBLIC
        ) as $method) {
            $methodName = $method->getName();
            if (isset($skip[$methodName])) {
                continue;
            }
            if (\ts\stringStartsWith($methodName, 'set')) {
                $this->setters[$this->getGetterForSetter($methodName)] = $methodName;
                continue;
            }
        }

        return $this->setters;
    }
public function getSetters(): array
    {
        if (null !== $this->setters) {
            return $this->setters;
        }
        $skip            = [
            'addPropertyChangedListener'     => true,
            'setEntityCollectionAndNotify'   => true,
            'addToEntityCollectionAndNotify' => true,
            'setEntityAndNotify'             => true,
        ];
        $this->setters   = [];
        $reflectionClass = $this->getReflectionClass();
        foreach ($reflectionClass->getMethods(
            \ReflectionMethod::IS_PRIVATE | \ReflectionMethod::IS_PUBLIC
        ) as $method) {
            $methodName = $method->getName();
            if (isset($skip[$methodName])) {
                continue;
            }
            if (\ts\stringStartsWith($methodName, 'set')) {
                $this->setters[$this->getGetterForSetter($methodName)] = $methodName;
                continue;
            }
        }

        return $this->setters;
    }
public function getSetters ( ) : array { if ( null !== $ this -> setters ) { return $ this -> setters ; } $ skip = [ 'addPropertyChangedListener' => true , 'setEntityCollectionAndNotify' => true , 'addToEntityCollectionAndNotify' => true , 'setEntityAndNotify' => true , ] ; $ this -> setters = [ ] ; $ reflectionClass = $ this -> getReflectionClass ( ) ; foreach ( $ reflectionClass -> getMethods ( \ ReflectionMethod :: IS_PRIVATE | \ ReflectionMethod :: IS_PUBLIC ) as $ method ) { $ methodName = $ method -> getName ( ) ; if ( isset ( $ skip [ $ methodName ] ) ) { continue ; } if ( \ ts \ stringStartsWith ( $ methodName , 'set' ) ) { $ this -> setters [ $ this -> getGetterForSetter ( $ methodName ) ] = $ methodName ; continue ; } } return $ this -> setters ; }
Get an array of setters by name

@return array|string[]
Get an array of setters by name