Ejemplo n.º 1
0
 /**
  * Builds the fields to insert for the given call and project
  * 
  * @param PC_Obj_Call $call the call
  * @param PC_Project $project the project
  * @return array an associative array with the fields
  */
 private function build_fields($call, $project)
 {
     $args = serialize($call->get_arguments());
     if (strlen($args) > self::MAX_ARGS_LEN) {
         $arglist = array();
         foreach ($call->get_arguments() as $arg) {
             $arg->clear_values();
             $arglist[] = $arg;
         }
         $args = serialize($arglist);
     }
     return array('project_id' => $project !== null ? $project->get_id() : 0, 'file' => $call->get_file(), 'line' => $call->get_line(), 'function' => $call->get_function(), 'class' => $call->get_class() === null ? null : $call->get_class(), 'static' => $call->is_static() ? 1 : 0, 'objcreation' => $call->is_object_creation() ? 1 : 0, 'arguments' => $args);
 }