public function import_webpage_search_data($webpage_id, $scope_indices) { if (is_string($webpage_id)) { $this->_CI_load('library', 'kals_resource/Webpage', 'webpage'); $webpage_id = $this->CI->webpage->filter_webpage_id($webpage_id); } $members = array(); if (is_int($scope_indices) || is_string($scope_indices)) { $scope_indices = array(array(intval($scope_indices), intval($scope_indices))); } foreach ($scope_indices as $scope_index) { $from = $scope_index[0]; $to = $scope_index[1]; //test_msg('import webpage list data', $scope_index); $scope = new Annotation_scope(); $scope->set_webpage($webpage_id); $scope->set_index($from, $to); $members[] = $scope; } $scope_coll = new Annotation_scope_collection(); $scope_coll->set_members($members); return $scope_coll; }