예제 #1
0
 /**
  * Sets scope for this expression so it knows its
  * source table.
  *
  * @param $stmt  FQLStatement that this expression was contained in
  */
 public function set_scope($stmt)
 {
     $this->right->set_scope($stmt);
     parent::set_scope($stmt);
 }
예제 #2
0
 /**
  * Sets the scope for this field expression. Performs validity
  * check on the field name by checking if the field name is
  * contained in the source table. Initializes the appropriate
  * field object for the field name for this table.
  *
  * @param  $scope FQLStatement that this expression is
  *                contained in
  *
  * Throws UnknownFieldException if this field name is not
  * a valid field in the source table.
  */
 public function set_scope($scope)
 {
     $fields = $scope->from_table->get_fields();
     if (isset($fields[$this->field_name])) {
         $this->field = new $fields[$this->field_name]($scope->user, $scope->app_id, $scope->from_table, $this->field_name);
     } else {
         throw new UnknownFieldException($this->field_name, $scope->from, 'table');
     }
     parent::set_scope($scope);
 }
예제 #3
0
파일: in.php 프로젝트: luxurymask/platform
 /**
  * Sets the scope for this IN expression by setting the scope for
  * the initial expression and the list of expressions.
  *
  * @param $scope the FQLStatement that this IN expression was contained in
  */
 public function set_scope($scope)
 {
     $this->expression->set_scope($scope);
     foreach ($this->list as $expression) {
         $expression->set_scope($scope);
     }
     parent::set_scope($scope);
 }