Lines Matching defs:typemap

169      * Updates the given typemap with new information.
171 * @param typemap array a typemap
176 function updateTypemap(&$typemap, $var, $type, $hint=null) {
177 if(empty($typemap[$var]) && $type) {
178 $typemap[$var] = array('type'=>$type,'hint'=>$hint);
216 * @param typemap array the type information collected so far
220 function constructQuery(&$root, &$typemap, $projection) {
255 list($group, $scope) = $this->transformGroup($tree, $typemap);
349 * @param typemap array the type information
352 function transformGroup(&$root, &$typemap) {
371 list($patterns, $filters, $scope) = $this->transformPatterns($patterns, $typemap);
375 list($u, $s) = $this->transformUnion($union, $typemap);
398 list($optional, $s) = $this->transformGroup($optional, $typemap);
434 list($minus, $s) = $this->transformGroup($minus, $typemap);
450 * @param typemap array the type information
453 function transformUnion(&$root, &$typemap) {
467 list($result,$scope) = $this->transformGroup(array_shift($subs), $typemap);
471 list($rhs, $s) = $this->transformGroup($sub, $typemap);
488 * @param typemap array the type information
491 function transformPatterns(&$lines, &$typemap) {
514 $this->updateTypemap($typemap, $subject['text'], 'ref');
526 $this->updateTypemap($typemap, $predicate['text'], 'text');
549 $this->updateTypemap($typemap, $object['text'], $vtype->type, $vtype->hint);
550 $this->updateTypemap($typemap, $object['text'], $type->type, $type->hint);
585 $this->updateTypemap($typemap, $lhs['text'], $ltype->type, $ltype->hint);
589 $this->updateTypemap($typemap, $rhs['text'], $ltype->type, $lhint->hint);
594 $this->updateTypemap($typemap, $rhs['text'], $rtype->type, $rtype->hint);
598 $this->updateTypemap($typemap, $lhs['text'], $rtype->type, $rtype->hint);
612 // update typemap if a type was defined
615 $this->updateTypemap($typemap, $lhs['text'],$type,$hint);
618 if(!empty($typemap[$lhs['text']])) {
619 extract($typemap[$lhs['text']]);
649 // update typemap if a type was defined
652 $this->updateTypemap($typemap, $rhs['text'],$type,$hint);
655 if(!empty($typemap[$rhs['text']])) {
656 extract($typemap[$rhs['text']]);
688 function getFields(&$tree, &$typemap) {
704 $fields = $this->parseFieldsLong($fieldsLines, $typemap);
714 function parseFieldsLong($lines, &$typemap) {
729 $this->updateTypemap($typemap, $variable, $type, $hint);
742 function parseFieldsShort($line, &$typemap) {
759 $this->updateTypemap($typemap, $variable, $type, $hint);