League\CommonMark\ContextInterface::getReferenceParser PHP Method

getReferenceParser() public method

public getReferenceParser ( ) : ReferenceParser
return ReferenceParser
    public function getReferenceParser();

Usage Example

 /**
  * @param ContextInterface $context
  * @param Cursor           $cursor
  *
  * @return bool
  */
 protected function parseReferences(ContextInterface $context, Cursor $cursor)
 {
     $referenceFound = false;
     while ($cursor->getCharacter() === '[' && $context->getReferenceParser()->parse($cursor)) {
         $this->finalStringContents = $cursor->getRemainder();
         $referenceFound = true;
     }
     return $referenceFound;
 }