<commit_before><?php
/**
 * 扩展orm model
 */

namespace Classes;

use \Orm\Query;

class Model extends \Orm\Model {

    /**
     * 遍历所有某些ID
     *
     * 使用:
     *
     * $orders = Model_Order::find('all');
     * list($memberIds, $phaseIds) = Model_Order::getIds($orders, ['member_id', 'phase_id']);
     *
     * @param $modelObj array 取出的记录对象
     * @param $idFields array 收集的字段
     *
     * @return array
     */
    public static function getIds($modelObj, $idFields) {

        $data = [];
        foreach($modelObj as $item) {
            $i = 0;
            foreach($idFields as $field) {
                $data[$i][] = $item->$field;
                $i++;
            }
            
        }<commit_msg>classes model<commit_after><?php
/**
 * 扩展orm model
 */

namespace Classes;

use \Orm\Query;

class Model extends \Orm\Model {

    /**
     * 遍历所有某些ID
     *
     * 使用:
     *
     * $orders = Model_Order::find('all');
     * list($memberIds, $phaseIds) = Model_Order::getIds($orders, ['member_id', 'phase_id']);
     *
     * @param $modelObj array 取出的记录对象
     * @param $idFields array 收集的字段
     *
     * @return array
     */
    public static function getIds($modelObj, $idFields) {

        $data = [];
        foreach($modelObj as $item) {
            foreach($idFields as $key => $field) {
                $data[$key][] = $item->$field;
            }
        }
{'fraction_non_alphanumeric': 0.1576283441793203, 'fraction_numerical': 0.0007230657989877079, 'mean_word_length': 1.8536082474226805, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '650311', 'n_tokens_mistral': 489, 'n_tokens_neox': 495, 'n_words': 93}