collect the annotation of Scheduled

@param string    $className
@param Scheduled $objectAnnotation
@param string    $methodName
431002
private static function collectScheduled(string $className, Scheduled $objectAnnotation, string $methodName)
    {
        if (!isset(self::$tasks['mapping'][$className])) {
            return;
        }

        $cron     = $objectAnnotation->getCron();
        $taskName = self::$tasks['mapping'][$className];

        self::$tasks['crons'][] = [
            'cron'      => $cron,
            'task'      => $taskName,
            'method'    => $methodName,
            'className' => $className,
        ];
    }
877512
public function parser(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        Collector::$methodAnnotations[$className][$methodName][] = get_class($objectAnnotation);
        return null;
    }
128104
public static function collect(
        string $className,
        $objectAnnotation = null,
        string $propertyName = '',
        string $methodName = '',
        $propertyValue = null
    ) {
        if ($objectAnnotation instanceof Column) {
            self::collectColumn($objectAnnotation, $className, $propertyName, $propertyValue);
        } elseif ($objectAnnotation instanceof Entity) {
            self::collectEntity($objectAnnotation, $className);
        } elseif ($objectAnnotation instanceof Id) {
            self::collectId($className, $propertyName);
        } elseif ($objectAnnotation instanceof Required) {
            self::collectRequired($className, $propertyName);
        } elseif ($objectAnnotation instanceof Table) {
            self::collectTable($objectAnnotation, $className);
        }
    }
297458
private function parseMethodAnnotations(string $className, \ReflectionMethod $method, array $methodAnnotations)
    {
        // 方法没有注解解析
        $methodName = $method->getName();
        $isWithoutMethodAnnotation = empty($methodAnnotations) || !isset($methodAnnotations[$methodName]);
        if ($isWithoutMethodAnnotation || !$this->isParseMethod($methodAnnotations[$methodName])) {
            $this->parseMethodWithoutAnnotation($className, $methodName);
            return;
        }

        // 循环方法注解解析
        foreach ($methodAnnotations[$methodName] as $methodAnnotationAry) {
            foreach ($methodAnnotationAry as $methodAnnotation) {
                if (!$this->inMethodAnnotations($methodAnnotation)) {
                    continue;
                }

                // 解析器解析
                $annotationParser = $this->getAnnotationParser($methodAnnotation);
                if ($annotationParser == null) {
                    $this->parseMethodWithoutAnnotation($className, $methodName);
                    continue;
                }
                $annotationParser->parser($className, $methodAnnotation, "", $methodName);
            }
        }
    }
1334023
protected function getObjectReferences(ObjectManager $objectManager, $className)
    {
        $identifier = $objectManager->getClassMetadata($className)->getIdentifier();
        $idField    = reset($identifier);

        /** @var EntityRepository $objectRepository */
        $objectRepository = $objectManager->getRepository($className);

        $idsResult = $objectRepository
            ->createQueryBuilder('t')
            ->select('t.' . $idField)
            ->getQuery()
            ->getArrayResult();

        $ids = [];
        foreach ($idsResult as $result) {
            $ids[] = $result[$idField];
        }

        return $this->getObjectReferencesByIds($objectManager, $className, $ids);
    }
674367
public function hasAnnotation($name, $methodName = NULL)
	{
		return NULL !== Annotations::hasAnnotation($name, $this, $methodName);
	}
567482
public static function getMethodsAnnotations($className, $annotationClassName = null)
    {
        if(null === $annotationClassName)
        {
            return static::$annotations[$className]['Methods'] ?? [];
        }
        $result = [];
        foreach(static::$annotations[$className]['Methods'] ?? [] as $methodName => $annotations)
        {
            foreach($annotations as $annotation)
            {
                if($annotation instanceof $annotationClassName)
                {
                    $result[$methodName][] = $annotation;
                }
            }
        }
        return $result;
    }
1017437
public static Function<Object,Calendar> calendar(final String methodName, final Object... optionalParameters) {
        return methodForCalendar(methodName, optionalParameters);
    }
403775
public function parser(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        $name     = $objectAnnotation->getName();
        $scope    = $objectAnnotation->getScope();
        $ref      = $objectAnnotation->getRef();
        $beanName = empty($name) ? $className : $name;

        return [$beanName, $scope, $ref];
    }
144419
public function getClassesContainingMethodsAnnotatedWith($annotationClassName)
    {
        if (!$this->initialized) {
            $this->initialize();
        }

        return isset($this->classesByMethodAnnotations[$annotationClassName]) ? array_keys($this->classesByMethodAnnotations[$annotationClassName]) : [];
    }
215956
public function setObjectName($objectName = null)
    {
        return parent::setObjectName(is_null($objectName) ? ( empty($this->getRecordIdent())
                    ? $this->getObjectName() : $this->getRecordIdent().'@'.$this->getObjectName() )
                    : $objectName);
    }
95893
public static function getClassAnnotations($className)
    {
        if (!isset(self::$annotationCache[$className])) {
            $class = new \ReflectionClass($className);
            self::$annotationCache[$className] = self::parseAnnotations($class->getDocComment());
        }

        return self::$annotationCache[$className];
    }
1324764
public static function getReturnTypes($className, $methodName)
	{
		$methodName = Method::from($className, $methodName);
		list($types) = preg_split('~\s~', $methodName->getAnnotation('return'), 2);
		return explode('|', $types);
	}
101697
public function parse(\Imi\Bean\Annotation\Base $annotation, string $className, string $target, string $targetName)
    {
    }
143795
public function load(string $objectName): void
    {
        // only Froq! stuff
        if (0 !== strpos($objectName, self::NAMESPACE)) {
            return;
        }

        $objectFile = $this->getObjectFile($objectName);

        if ($objectFile == null) {
            throw new \RuntimeException("Could not specify object file '{$objectName}'");
        }

        if (!file_exists($objectFile)) {
            throw new \RuntimeException("Could not find object file '{$objectFile}'");
        }

        require $objectFile;
    }
226214
public static function collect(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        if ($objectAnnotation instanceof Breaker) {
            $breakerName = $objectAnnotation->getName();
            $breakerName = empty($breakerName) ? $className : $breakerName;

            self::$breakers[$breakerName] = $className;
        }
    }
333444
public function parser(
        string $className,
        $objectAnnotation = null,
        string $propertyName = '',
        string $methodName = '',
        $propertyValue = null
    ) {
        $collector = ControllerCollector::getCollector();

        if (!isset($collector[$className])) {
            return;
        }

        // Collect requestMapping
        ControllerCollector::collect($className, $objectAnnotation, $propertyName, $methodName, $propertyValue);
    }