public function getSource()
{
if ($this->isSource()) {
return $this;
} else {
$expression = $this->expression;
while ($expression instanceof O\TraversalExpression) {
$expression = $expression->getValue();
}
if ($expression instanceof O\ValueExpression) {
return $expression->getValue();
} else {
throw new PinqException('Invalid origin expression: must be instance of %s', O\ValueExpression::getType());
}
}
}