src/Entity/Traits/UsesPHPMetaDataTrait.php
private function runInitMethods(): void
    {
        $reflectionClass = self::getDoctrineStaticMeta()->getReflectionClass();
        $methods         = $reflectionClass->getMethods(\ReflectionMethod::IS_PRIVATE);
        foreach ($methods as $method) {
            if ($method instanceof ReflectionMethod) {
                $method = $method->getName();
            }
            if (\ts\stringContains($method, UsesPHPMetaDataInterface::METHOD_PREFIX_INIT)
                && \ts\stringStartsWith($method, UsesPHPMetaDataInterface::METHOD_PREFIX_INIT)
            ) {
                $this->$method();
            }
        }
    }
private function runInitMethods(): void
    {
        $reflectionClass = self::getDoctrineStaticMeta()->getReflectionClass();
        $methods         = $reflectionClass->getMethods(\ReflectionMethod::IS_PRIVATE);
        foreach ($methods as $method) {
            if ($method instanceof ReflectionMethod) {
                $method = $method->getName();
            }
            if (\ts\stringContains($method, UsesPHPMetaDataInterface::METHOD_PREFIX_INIT)
                && \ts\stringStartsWith($method, UsesPHPMetaDataInterface::METHOD_PREFIX_INIT)
            ) {
                $this->$method();
            }
        }
    }
private function runInitMethods ( ) : void { $ reflectionClass = self :: getDoctrineStaticMeta ( ) -> getReflectionClass ( ) ; $ methods = $ reflectionClass -> getMethods ( \ ReflectionMethod :: IS_PRIVATE ) ; foreach ( $ methods as $ method ) { if ( $ method instanceof ReflectionMethod ) { $ method = $ method -> getName ( ) ; } if ( \ ts \ stringContains ( $ method , UsesPHPMetaDataInterface :: METHOD_PREFIX_INIT ) && \ ts \ stringStartsWith ( $ method , UsesPHPMetaDataInterface :: METHOD_PREFIX_INIT ) ) { $ this -> $ method ( ) ; } } }
Find and run all init methods
- defined in relationship traits and generally to init ArrayCollection properties

@throws \ReflectionException
Find and run all init methods - defined in relationship traits and generally to init ArrayCollection properties