Reference element identifying a data type to carry
over to the invoked target.

@param PhingReference $r the specified `PhingReference`.
170469
public function addReference(PhingReference $r)
    {
        if ($this->callee === null) {
            $this->init();
        }
        $this->callee->addReference($r);
    }
593197
public void setR(double R)
    {
        if(R <= 0 || Double.isNaN(R) || Double.isInfinite(R))
            throw new IllegalArgumentException("R must be positive, not " + R);
        this.R = R;
    }
900150
protected function renderReference($reference)
    {
        if (!isset($this->settings['references'][$reference])) {
            $this->outputLine('Reference "%s" is not configured', [$reference]);
            $this->quit(1);
        }
        $referenceConfiguration = $this->settings['references'][$reference];
        $affectedClassNames = $this->getAffectedClassNames($referenceConfiguration['affectedClasses']);
        $parserClassName = $referenceConfiguration['parser']['implementationClassName'];
        $parserOptions = isset($referenceConfiguration['parser']['options']) ? $referenceConfiguration['parser']['options'] : [];
        /** @var $classParser \Neos\DocTools\Domain\Service\AbstractClassParser */
        $classParser = new $parserClassName($parserOptions);
        $classReferences = [];
        foreach ($affectedClassNames as $className) {
            $classReferences[$className] = $classParser->parse($className);
        }
        usort($classReferences, function (ClassReference $a, ClassReference $b) {
            if ($a->getTitle() == $b->getTitle()) {
                return 0;
            }

            return ($a->getTitle() < $b->getTitle()) ? -1 : 1;
        });
        $standaloneView = new \Neos\FluidAdaptor\View\StandaloneView();
        $templatePathAndFilename = isset($referenceConfiguration['templatePathAndFilename']) ? $referenceConfiguration['templatePathAndFilename'] : 'resource://Neos.DocTools/Private/Templates/ClassReferenceTemplate.txt';
        $standaloneView->setTemplatePathAndFilename($templatePathAndFilename);
        $standaloneView->assign('title', isset($referenceConfiguration['title']) ? $referenceConfiguration['title'] : $reference);
        $standaloneView->assign('classReferences', $classReferences);
        file_put_contents($referenceConfiguration['savePathAndFilename'], $standaloneView->render());
        $this->outputLine('DONE.');
    }
980430
public function setReference($reference = null)
    {
        $reference === null && $reference = PaymentHelper::generateReference($this->getTransactionId());
        $this->params['reference'] = $reference;
        return $this;
    }
393535
public function setRefid(Reference $r)
    {
        if ($this->dir !== null || count($this->filenames) !== 0) {
            throw $this->tooManyAttributes();
        }
        parent::setRefid($r);
    }
674448
public function setReference(ViewReference $reference = null, $locale = null)
    {
        $locale = $locale ?: $this->getCurrentLocale();
        $this->references[$locale] = $reference;

        return $this;
    }
307057
public function addReference($p1, $p2 = null)
    {
        if (is_array($p1)) {
            $this->addReference(@$p1["local"], @$p1["foreign"]);
        } else {
            if ($p1 instanceof Column) {
                $p1 = $p1->getName();
            }
            if ($p2 instanceof Column) {
                $p2 = $p2->getName();
            }
            $this->localColumns[] = $p1;
            $this->foreignColumns[] = $p2;
        }
    }
224483
private void calcReferenceVector() {
		referenceVector = getReferenceAxisCylic();

		if (referenceVector == null) {
			logger.warn("no reference vector found. Using y-axis.");
			referenceVector = new Vector3d(Y_AXIS);
		}
		// make sure reference vector is perpendicular principal roation vector
		referenceVector = orthogonalize(principalRotationVector, referenceVector);
	}
24880
public function addReference($ref1, $ref2 = null)
    {
        if (is_array($ref1)) {
            $this->localColumns[] = isset($ref1['local']) ? $ref1['local'] : null;
            $this->foreignColumns[] = isset($ref1['foreign']) ? $ref1['foreign'] : null;
            $this->localValues[] = isset($ref1['value']) ? $ref1['value'] : null;

            return;
        }

        if (is_string($ref1)) {
            $this->localColumns[] = $ref1;
            $this->foreignColumns[] = is_string($ref2) ? $ref2 : null;
            $this->localValues[] = null;

            return;
        }

        $local = null;
        $foreign = null;
        if ($ref1 instanceof Column) {
            $local = $ref1->getName();
            $this->localColumns[] = $local;
        } else {
            $this->localValues[] = $local;
        }

        if ($ref2 instanceof Column) {
            $foreign = $ref2->getName();
            $this->foreignColumns[] = $foreign;
            $this->localValues[] = null;
        } else if ($ref1 instanceof Column) {
            $this->foreignColumns[] = null;
            $this->localValues[] = $ref2;
        }
    }
772688
function it_should_replace_input_message_references_by_reference_html_link($reference1, $reference2) {
        $reference1->getStartIndice()->willReturn(5);
        $reference1->getEndIndice()->willReturn(10);
        $reference1->getType()->willReturn(ReferenceType::USER);
        $reference1->getData()->willReturn(array(
            "id"          => 6844292,
            "name"        => "John Doe",
            "type"        => "user",
            "offset"      => 5,
            "length"      => 5
        ));

        $reference2->getStartIndice()->willReturn(12);
        $reference2->getEndIndice()->willReturn(17);
        $reference2->getType()->willReturn(ReferenceType::PAGE);
        $reference2->getData()->willReturn(array(
            "id"          => 32425,
            "name"        => "test",
            "type"        => "page",
            "offset"      => 5,
            "length"      => 5
        ));

        $this->format('test @jdoe, @test bar', [$reference2, $reference1])
            ->shouldReturn('test <a href="https://www.facebook.com/6844292" target="_blank">@jdoe</a>, <a href="https://www.facebook.com/32425" target="_blank">@test</a> bar');

        $this->format('foo #média bar', [])
            ->shouldReturn('foo <a href="https://www.facebook.com/hashtag/média" target="_blank">#média</a> bar');

        $this->format('foo http://test.com bar', [])
            ->shouldReturn('foo <a href="http://test.com" target="_blank">http://test.com</a> bar');
    }
631606
private function parseRefAsPull($reference): ?string
    {
        if (preg_match(self::REGEX_PULL, $reference, $matches) !== 1) {
            return null;
        }

        return $matches[1];
    }
763045
public function resolveReferences(ReferenceContext $context = null)
    {
        foreach ($this->_properties as $property => $value) {
            if ($value instanceof Reference) {
                $this->_properties[$property] = $value->resolve($context);
            } elseif ($value instanceof SpecObjectInterface) {
                $value->resolveReferences($context);
            } elseif (is_array($value)) {
                foreach ($value as $k => $item) {
                    if ($item instanceof Reference) {
                        $this->_properties[$property][$k] = $item->resolve($context);
                    } elseif ($item instanceof SpecObjectInterface) {
                        $item->resolveReferences($context);
                    }
                }
            }
        }
    }
692403
@Override
	public void setEntityReference(EntityReference entityReference) {
		if(entityReference instanceof DnaReference || entityReference == null)
			super.setEntityReference(entityReference);
		else
			throw new IllegalBioPAXArgumentException("setEntityReference failed: "
					+ entityReference.getUri() + " is not a DnaReference.");
	}
30149
public static function referInt($name, $default = null)
    {
        $res = self::getReferParams($name);
        if (!is_null($res)) return self::parseInputToInt($res);
        return (is_null($default) ? null : intval($default));
    }
1211168
@Override
	public void setEntityReference(EntityReference entityReference) {
		if(entityReference instanceof DnaRegionReference || entityReference == null)
			super.setEntityReference(entityReference);
		else
			throw new IllegalBioPAXArgumentException("setEntityReference failed: "
					+ entityReference.getUri() + " is not a DnaRegionReference.");
	}
1262888
public function findElementtypesUsingReferenceElementtype(Elementtype $referenceElementtype)
    {
        $elementtypes = array();
        foreach ($this->elementtypeManager->findAll() as $elementtype) {
            if (!$elementtype->getStructure()->getRootNode()) {
                continue;
            }
            $rii = new \RecursiveIteratorIterator($elementtype->getStructure()->getIterator(), \RecursiveIteratorIterator::SELF_FIRST);
            foreach ($rii as $node) {
                /* @var $node ElementtypeStructureNode */
                if ($node->getReferenceElementtypeId() === $referenceElementtype->getId()) {
                    $elementtypes[] = $elementtype;
                    break;
                }
            }
        }

        return $elementtypes;
    }
263129
private function resolveReference(Reference $reference)
    {
        if (!ExternalReference::isValid($reference)) {
            return $reference;
        }

        return $this->transformReferenceToDefinition(new ExternalReference($reference));
    }