Gets list of all the annotations on a specified document page.

@param integer $pageNumber Number of the page.

@return array
@throws Exception
181527
public function getAllAnnotations($pageNumber)
    {

        $iTotalAnnotation = $this->GetAnnotationsCount($pageNumber);
        $listAnnotations = array();
        for ($index = 1; $index <= $iTotalAnnotation; $index++) {
            array_push($listAnnotations, $this->GetAnnotation($pageNumber, $index));
        }
        return $listAnnotations;
    }
698282
final public function getAll($docType = '', $forceNew = '') {
        $this->getClass($docType, $forceNew);
        $this->getProperties($docType, $forceNew);
        $this->getMethods($docType, $forceNew);

        return $this->annotations;
    }
806713
private function itemFactory($pageNumber, $title = null)
    {
        return array(
            'url' => sprintf($this->urlTemplate, $pageNumber),
            'title' => $title ? $title : $pageNumber,
            'current' => false
        );
    }
108758
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllPromotions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllPromotions();
        }
    }
317525
private function parseAnnotations($docBlock, $pattern, callable $callback)
    {
        $annotations = [];
        // Strip away the docblock header and footer to ease parsing of one line annotations
        $docBlock = substr($docBlock, 3, -2);

        if (preg_match_all($pattern, $docBlock, $matches) && is_callable($callback)) {
            return call_user_func($callback, $matches);
        }

        return $annotations;
    }
257924
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCoupons(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCoupons();
        }
    }
1175740
private function scanFileListForAnnotations()
    {
        $annotations = [];
        foreach ($this->getFileList() as $file) {
            $this->classListByFiles[$file] = ClassInformationFromFile::getClassesFromFile($file)[0];
            $annotations[$this->classListByFiles[$file]] = $this->scanClassForAnnotations(
                $this->classListByFiles[$file]
            );
        }
        return $annotations;
    }
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];
    }
466027
public static function set_annotations($gradeid, $pageno, $annotations) {
        global $DB;

        $DB->delete_records('assignfeedback_editpdf_annot', array('gradeid' => $gradeid, 'pageno' => $pageno, 'draft' => 1));
        $added = 0;
        foreach ($annotations as $record) {
            // Force these.
            if (!($record instanceof annotation)) {
                $annotation = new annotation($record);
            } else {
                $annotation = $record;
            }
            $annotation->gradeid = $gradeid;
            $annotation->pageno = $pageno;
            $annotation->draft = 1;
            if (self::add_annotation($annotation)) {
                $added++;
            }
        }

        return $added;
    }
949077
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllDiscountPromotions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllDiscountPromotions();
        }
    }
955942
public function listColumns()
    {
        if (!is_null($this->listColumns)) {
            return $this->listColumns;
        }

        // We use this method to load the annotation classes, because the annotation Library Doctrine does not
        AnnotationManager::autoLoadAnnotation();

        // Set the list of properties, an array to contain the list of columns and a boolean to check if the class has several indexes
        $properties = $this->reflection->getProperties();
        $haveIndex = false;
        $columns = array();

        foreach ($properties as $property) {
            // For each properties, get the list of annotations
            $propertyAnnotation = $this->annotationReader->getPropertyAnnotations($property);
            // Check the property has a Column Annotation
            if (($columnAnnotation = self::haveAnnotation(self::$ColumnAnnotation, $propertyAnnotation)) !== false) {
                $columnAnnotation->check();
                $column = array(
                    'type' => $columnAnnotation->type,
                    'strict' => $columnAnnotation->strict
                );
                // Check the property has an Index Annotation
                if (($indexAnnotation = self::haveAnnotation(self::$IndexAnnotation, $propertyAnnotation)) !== false) {
                    $indexAnnotation->check();
                    // Verify that the class have a unique index annotation
                    if ($haveIndex == true) {
                        throw new InvalidAnnotationException($indexAnnotation, $property->getName(), 'Class ' . $this->className . ' have already an index when he read the annotation of ' . $property->getName());
                    }
                    $column['index'] = true;
                    $haveIndex = true;
                } else {
                    $column['index'] = false;
                }

                // If is an entity Column, check entityRelationAnnotation
                if ($column['type'] == 'entity') {
                    if (($relationAnnotation = self::haveAnnotation(self::$entityRelationAnnotation, $propertyAnnotation)) !== false) {
                        $relationAnnotation->check();
                        try {
                            $annotationClassOfRelation = EntityAnalyzer::get($relationAnnotation->classname)->getClassAnnotation();
                        } catch (InvalidEntityException $e) {
                            throw new InvalidAnnotationException($relationAnnotation, 'classname', 'The class ' . $relationAnnotation->classname . ' is not an Entity');
                        }

                        $column['relation'] = array(
                            'classname' => $relationAnnotation->classname,
                            'multi' => $relationAnnotation->multi,
                            'ignore_errors' => $relationAnnotation->ignore_errors
                        );
                    } else {
                        throw new InvalidAnnotationException(null, null, 'A Entity Column must have a EntityRelation annotations');
                    }
                }

                $columns[$property->getName()] = $column;
            }
        }

        $this->listColumns = $columns;
        return $columns;
    }
817080
private function Annotations()
    {
        $annotations = [];

        while (null !== $this->lexer->lookahead) {
            if (DocLexer::T_AT !== $this->lexer->lookahead['type']) {
                $this->lexer->moveNext();
                continue;
            }

            // make sure the @ is preceded by non-catchable pattern
            if (null !== $this->lexer->token && $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value'])) {
                $this->lexer->moveNext();
                continue;
            }

            // make sure the @ is followed by either a namespace separator, or
            // an identifier token
            if ((null === $peek = $this->lexer->glimpse())
                || (DocLexer::T_NAMESPACE_SEPARATOR !== $peek['type'] && !in_array($peek['type'], self::$classIdentifiers, true))
                || $peek['position'] !== $this->lexer->lookahead['position'] + 1) {
                $this->lexer->moveNext();
                continue;
            }

            $this->isNestedAnnotation = false;
            if (false !== $annot = $this->Annotation()) {
                $annotations[] = $annot;
            }
        }

        return $annotations;
    }
1043883
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCustomers(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCustomers();
        }
    }
1127529
public function getClassesAndAnnotations()
    {
        static $classesAndAnnotations;
        if ($classesAndAnnotations === null) {
            $classesAndAnnotations = [];
            foreach (array_keys($this->indexAnnotations) as $className) {
                $classesAndAnnotations[$className] = $this->indexAnnotations[$className]['annotation'];
            }
        }

        return $classesAndAnnotations;
    }
172279
public function getClassAnnotations()
    {
        $reflector = new ReflectionClass($this->className);
        $doc = $reflector->getDocComment();
        if (!$doc) {
            return;
        }

        $annotations = [];
        foreach ($this->filteringList as $filter) {
            preg_match_all('#@' . $filter . '(.*?)\n#s', $doc, $annotation);
            if (count($annotation[1]) > 0) {
                $annotations[$filter] = $annotation[1];
            }
        }
        $this->annotationObject->mergeClassAnnotations($annotations);
    }
375867
public static function getPropertiesAnnotations($className, $annotationClassName = null)
    {
        if(null === $annotationClassName)
        {
            return static::$annotations[$className]['Properties'] ?? [];
        }
        $result = [];
        foreach(static::$annotations[$className]['Properties'] ?? [] as $propertyName => $annotations)
        {
            foreach($annotations as $annotation)
            {
                if($annotation instanceof $annotationClassName)
                {
                    $result[$propertyName][] = $annotation;
                }
            }
        }
        return $result;
    }
936461
public function getLink($pageNumber, $linkIndex)
    {

        $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/pages/' . $pageNumber . '/links/' . $linkIndex;
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');
        $json = json_decode($responseStream);
        return $json->Link;
    }