Lines Matching refs:anchor
227 * @param array $anchor raw anchor {exact, prefix, suffix, start}
232 public function createAnnotation($id, $anchor, $author, $body) argument
241 $anchor = $this->cleanAnchor($anchor);
242 if ($anchor === null) {
249 'anchor' => $anchor,
786 * @param mixed $anchor
789 protected function cleanAnchor($anchor) argument
791 if (!is_array($anchor)) {
795 $exact = (isset($anchor['exact']) && is_string($anchor['exact']))
796 ? $this->normalizeWhitespace($anchor['exact'])
805 $prefix = (isset($anchor['prefix']) && is_string($anchor['prefix']))
806 ? $this->normalizeWhitespace($anchor['prefix'])
808 $suffix = (isset($anchor['suffix']) && is_string($anchor['suffix']))
809 ? $this->normalizeWhitespace($anchor['suffix'])
819 $start = isset($anchor['start']) ? max(0, (int) $anchor['start']) : 0;