Get product reviews from feefo.

@param bool $check

@return array
492392
public function getProductsReview($check = true)
    {
        $reviews = [];
        $logon = $this->helper->getFeefoLogon();
        $limit = $this->helper->getFeefoReviewsPerProduct();
        $products = $this->getQuoteProducts();

        foreach ($products as $sku => $name) {
            $url = 'http://www.feefo.com/feefo/xmlfeed.jsp?logon=' . $logon
                . '&limit=' . $limit . '&vendorref=' . $sku
                . '&mode=productonly';
            $doc = $this->domDocument;
            $xsl = $this->processor;
            if ($check) {
                $pathToTemplate = $this->getFeefoTemplate('feedback.xsl');
                $doc->load($pathToTemplate);
            } else {
                $pathToTemplate = $this->getFeefoTemplate('feedback-no-th.xsl');
                $doc->load($pathToTemplate);
            }
            $xsl->importStyleSheet($doc);
            $doc->loadXML(file_get_contents($url));
            $productReview = $xsl->transformToXML($doc);
            if (strpos($productReview, '<td') !== false) {
                $reviews[$name] = $xsl->transformToXML($doc);
            }
            $check = false;
        }

        return $reviews;
    }
449210
protected function getCheckSQLDeclaration(Check $check)
    {
        if (!$this->supportChecks()) {
            throw PlatformException::methodNotSupported(__METHOD__);
        }

        return 'CONSTRAINT '.$check->getName().' CHECK ('.$check->getDefinition().')';
    }
375356
public function items($count = false)
    {
        $this->query = $this->model->newQuery();

        return $this->query($count);
    }
842826
public function getReviews()
    {
        if ($this->_aReviews === null) {
            $this->_aReviews = false;
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadReviews')) {
                $this->_aReviews = $this->getProduct()->getReviews();
            }
        }

        return $this->_aReviews;
    }
152197
public function getSearchProduct()
    {
        if ($this->_oSearchProduct === null) {
            $this->_oSearchProduct = false;
            $sSearchArtNum = $this->getSearchProductArtNr();

            foreach ($this->getProductList() as $oProduct) {
                if ($oProduct->oxarticles__oxartnum->value == $sSearchArtNum) {
                    $this->_oSearchProduct = $oProduct;
                    break;
                }
            }
        }

        return $this->_oSearchProduct;
    }
827510
public function getReviews()
    {
        if ($this->_aReviews === null) {
            $this->_aReviews = false;
            if ($oObject = $this->_getActiveObject()) {
                $this->_aReviews = $oObject->getReviews();
            }
        }

        return $this->_aReviews;
    }
58736
public function get($modified = true)
    {
        //Argument 1 must be a boolean
        Argument::i()->test(1, 'bool');

        $array = array();
        //for each row
        foreach ($this->list as $i => $row) {
            //get the array of that (recursive)
            $array[$i] = $row->get($modified);
        }

        return $array;
    }
331062
public function getComments($postId = false)
    {
        $cArgs = [
            'author__in' => $this->ID,
            'orderby' => 'comment_date_gmt'
        ];
        if ($postId) {
            $cArgs['post_id'] = $postId;
        }
        $comments = [];
        foreach (get_comments($cArgs) as $c) {
            $comments[] = Comment::find($c->comment_ID);
        }
        return $comments;
    }
567163
private function getReview()
    {
        $review = [];
        $review_area = $this->_parser->find('.js-scrollfix-bottom-rel', 0);
        $review_area = $review_area->find('table tr', 1);
        $review_area = $review_area->find('.borderDark');
        foreach ($review_area as $each_review) {
            $tmp = [];

            $top_area = $each_review->find('.spaceit', 0);
            $bottom_area = $top_area->next_sibling();
            $very_bottom_area = $bottom_area->next_sibling();

            $tmp['id'] = $this->getReviewId($very_bottom_area);
            $tmp['username'] = $this->getReviewUser($top_area);
            $tmp['image'] = $this->getReviewImage($top_area);
            $tmp['helpful'] = $this->getReviewHelpful($top_area);
            $tmp['date'] = $this->getReviewDate($top_area);
            if ($this->_type == 'anime') {
                $tmp['episode'] = $this->getReviewEpisode($top_area);
            } else {
                $tmp['chapter'] = $this->getReviewEpisode($top_area);
            }
            $tmp['score'] = $this->getReviewScore($bottom_area);
            $tmp['review'] = $this->getReviewText($bottom_area);

            $review[] = $tmp;
        }

        return $review;
    }
1013291
static public function getStatuses()
    {
        return [
            self::STATUS_NEW => \Yii::t('skeeks/reviews2', "New"),
            self::STATUS_PROCESSED => \Yii::t('skeeks/reviews2', "In Progress"),
            self::STATUS_ALLOWED => \Yii::t('skeeks/reviews2', "Approved"),
            self::STATUS_CANCELED => \Yii::t('skeeks/reviews2', "Rejected"),
        ];
    }
278153
public function getCheckers($checker)
    {
        switch ($checker) {
            case static::FILE_EXISTS:
                return [$this->buildFileExistsChecker()];
            case static::FILE_DOES_NOT_EXISTS:
                return [$this->buildFileDoesNotExistsChecker()];
            case static::DIRECTORY_EXISTS:
                return [
                    $this->buildFileExistsChecker(),
                    $this->buildIsDirectoryChecker(),
                ];
            case static::DIRECTORY_DOES_NOT_EXISTS:
                return [
                    $this->buildFileDoesNotExistsChecker(),
                    $this->buildIsDirectoryChecker(),
                ];
        }

        return [];
    }
15408
protected function getReviews()
    {
        $limit        = isset($this->params['limit'])
            ? (int)$this->params['limit']
            : null;
        $offset       = isset($this->params['offset'])
            ? (int)$this->params['offset']
            : null;
        $uids         = isset($this->params['uids'])
            ? (array)$this->params['uids']
            : array();
        $responseType = isset($this->params['response_type'])
            ? $this->params['response_type']
            : false;

        $supportedResponseTypes = $this->config->getSupportedResponseTypes();
        if (!empty($responseType) && !in_array($responseType, $supportedResponseTypes['get_reviews'])) {
            throw new ShopgateLibraryException(
                ShopgateLibraryException::PLUGIN_API_UNSUPPORTED_RESPONSE_TYPE,
                'Requested type: "' . $responseType . '"'
            );
        }

        $this->plugin->startGetReviews($limit, $offset, $uids, $responseType);

        switch ($responseType) {
            default:
            case 'xml':
                $response     = new ShopgatePluginApiResponseAppXmlExport($this->trace_id);
                $responseData = $this->config->getReviewsXmlPath();
                break;

            case 'json':
                $response     = new ShopgatePluginApiResponseAppJsonExport($this->trace_id);
                $responseData = $this->config->getReviewsJsonPath();
                break;
        }

        if (empty($this->response)) {
            $this->response = $response;
        }

        $this->responseData = $responseData;
    }
1223918
public static function is($check)
    {
        switch ($check) {
            case 'secure':
                return empty($_SERVER['HTTPS']) === false && strcasecmp($_SERVER['HTTPS'], 'on') === 0;

            case 'xhr':
                return strcasecmp(self::header('X-Requested-With'), 'xmlhttprequest') === 0;

            case 'pjax':
                return strcasecmp(self::header('X-Pjax'), 'true') === 0;
        }

        return strcasecmp($_SERVER['REQUEST_METHOD'], $check) === 0;
    }
870903
protected function getGenericChecks(array $checks)
    {
        $genericChecks = array();

        foreach ($checks as $check) {
            $genericChecks[] = new Check($check['name'], $check['definition']);
        }

        return $genericChecks;
    }
201703
protected function getTotalReviewsProduct(array $product)
    {
        $options = array(
            'status' => 1,
            'count' => true,
            'user_status' => 1,
            'product_id' => $product['product_id']
        );

        return (int) $this->review->getList($options);
    }
326634
protected function _getValidShopViews()
    {
        if (empty($this->_aValidShopViews)) {
            $aTables = $this->getShopTables();
            $this->_aValidShopViews = [];

            foreach ($aTables as $sTable) {
                $this->prepareShopTableViewNames($sTable);
            }
        }

        return $this->_aValidShopViews;
    }
430307
protected function getListReview()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->review->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('user')) {
            return $this->review->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('product')) {
            return $this->review->getList(array('product_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->review->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }