<commit_before><?php

namespace RcmAdmin\Entity;

use Rcm\Entity\Page;

/**
 * Class SitePageApiResponse
 *
 * SitePage API Response Model
 *
 * PHP version 5
 *
 * @category  Reliv
 * @package   RcmAdmin\Entity
 * @author    <NAME> <<EMAIL>>
 * @copyright 2014 Reliv International
 * @license   License.txt New BSD License
 * @version   Release: <package_version>
 * @link      https://github.com/reliv
 */
class SitePageApiResponse extends Page
{
    /**
     * @param Page $page
     */
    public function __construct(Page $page)
    {
        $this->populate(
            $page->toArray(),
            [
                'createdDate',
                'createdByUserId',
                'modifiedByUserId'
            ]
        );

        $this->createdDate = $page->getCreatedDate();
        $this->createdByUserId = $page->getCreatedByUserId();
        $this->createdReason = $page->getCreatedReason();
        $this->modifiedDate = $page->getModifiedDate();
        $this->modifiedByUserId = $page->getModifiedByUserId();
        $this->modifiedReason = $page->getModifiedReason();
    }

    /**
     * toArray
     *
     * @param array $ignore
     *
     * @return array
     */
    public function toArray($ignore = [])
    {
        return [
            'siteId' => $this->getSiteId(),
            'pageId' => $this->getPageId(),
            'name' => $this->getName(),
            'author' => $this->getAuthor(),
            'createdDate' => $this->getCreatedDateString(\DateTime::ISO8601),
            'lastPublished' => $this->getLastPublishedString(\DateTime::ISO8601),<commit_msg>Tracking Update<commit_after><?php

namespace RcmAdmin\Entity;

use Rcm\Entity\Page;

/**
 * Class SitePageApiResponse
 *
 * SitePage API Response Model
 *
 * PHP version 5
 *
 * @category  Reliv
 * @package   RcmAdmin\Entity
 * @author    <NAME> <<EMAIL>>
 * @copyright 2014 Reliv International
 * @license   License.txt New BSD License
 * @version   Release: <package_version>
 * @link      https://github.com/reliv
 */
class SitePageApiResponse extends Page
{
    /**
     * @param Page $page
     */
    public function __construct(Page $page)
    {
        $this->populate(
            $page->toArray(),
            [
                'createdDate',
                'createdByUserId',
                'modifiedByUserId'
            ]
        );

        parent::__construct(
            $page->getCreatedByUserId(),
            self::class
        );
    }

    /**
     * toArray
     *
     * @param array $ignore
     *
     * @return array
     */
    public function toArray($ignore = [])
    {
        return [
            'siteId' => $this->getSiteId(),
            'pageId' => $this->getPageId(),
            'name' => $this->getName(),
            'author' => $this->getAuthor(),
            'createdDate' => $this->getCreatedDateString(\DateTime::ISO8601),
            'lastPublished' => $this->getLastPublishedString(\DateTime::ISO8601),
{'fraction_non_alphanumeric': 0.14266350389698407, 'fraction_numerical': 0.00881057268722467, 'mean_word_length': 2.0590673575129532, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 52, 'https://': 2, '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': '6796071', 'n_tokens_mistral': 872, 'n_tokens_neox': 852, 'n_words': 161}