<commit_before><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Model
 */

namespace PH7;

use PH7\Framework\Mvc\Model\Engine\Db;
use PH7\Framework\Mvc\Model\Engine\Model;

class NoteCoreModel extends Model
{
    const CACHE_GROUP = 'db/sys/mod/note';
    const CACHE_TIME = 999990;

    const POSTS_CACHE_ENABLED = false;

    /**
     * Gets all note posts.
     *
     * @param int $iOffset
     * @param int $iLimit
     * @param string $sOrder A constant: SearchCoreModel::CREATED (default value) or SearchCoreModel::UPDATED
     * @param int|null $iApproved (0 = Unmoderated | 1 = Approved | NULL = unmoderated and approved)
     *
     * @return array
     */
    public function getPosts($iOffset, $iLimit, $sOrder = SearchCoreModel::CREATED, $iApproved = 1)
    {
        // Disabled the cache (if you have a few notes, you can enable it to improve performance).<commit_msg>Move comment to constant level (so easier to understand & enable it)<commit_after><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Model
 */

namespace PH7;

use PH7\Framework\Mvc\Model\Engine\Db;
use PH7\Framework\Mvc\Model\Engine\Model;

class NoteCoreModel extends Model
{
    const CACHE_GROUP = 'db/sys/mod/note';
    const CACHE_TIME = 999990;

    // Disabled cache (if you have a few notes, you can enable it to improve performance)
    const POSTS_CACHE_ENABLED = false;

    /**
     * Gets all note posts.
     *
     * @param int $iOffset
     * @param int $iLimit
     * @param string $sOrder A constant: SearchCoreModel::CREATED (default value) or SearchCoreModel::UPDATED
     * @param int|null $iApproved (0 = Unmoderated | 1 = Approved | NULL = unmoderated and approved)
     *
     * @return array
     */
    public function getPosts($iOffset, $iLimit, $sOrder = SearchCoreModel::CREATED, $iApproved = 1)
    {
{'fraction_non_alphanumeric': 0.112, 'fraction_numerical': 0.020444444444444446, 'mean_word_length': 2.907986111111111, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '4037538', 'n_tokens_mistral': 735, 'n_tokens_neox': 703, 'n_words': 220}