Gets all the text items in a slide or presentation.

@param integer $slideNumber The number of slide.
@param string $withEmpty

@return array
@throws Exception
198172
public function getAllTextItems()
    {
        $parameters = func_get_args();

        //set parameter values
        if (count($parameters) == 2) {
            $slideNumber = $parameters[0];
            $withEmpty = $parameters[1];
        }




        //Build URI to get all text items
        $strURI = Product::$baseProductUri . '/slides/' . $this->getFileName() .
            ((isset($parameters[0])) ? '/slides/' . $slideNumber . '/textItems?withEmpty=' . $withEmpty : '/textItems');

        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        return $json->TextItems->Items;
    }
656965
public function getContent(FlattenException $exception, $showAll = true)
    {
        switch ($exception->getStatusCode()) {
            case 404:
                $title = "The page you are looking for could not be found";
                break;
            default:
                $title = "Oh noes, something's broken";
        }

        $content = '';
        if ($this->debug) {
            try {
                $exceptions = $exception->toArray();
                if (false === $showAll) {
                    $exceptions = array_slice($exceptions, -1, 1);
                    $count      = 1;
                    $total      = 1;
                } else {
                    $count = count($exception->getAllPrevious());
                    $total = $count + 1;
                }

                foreach ($exceptions as $position => $e) {
                    $i       = 0;
                    $class   = $this->abbrClass($e['class']);
                    $message = nl2br($e['message']);

                    if (false === $showAll) {
                        $content .= sprintf(<<<EOT
                        <div>
                            <h3 class="alert alert-error">%s: %s</h3>
                        </div>
EOT
                            , $class, $message);
                    } else {
                        $ind = $count - $position + 1;
                        $content .= sprintf(<<<EOT
                        <div>
                            <h3 class="alert alert-error">%d/%d %s: %s</h3>
                        </div>
EOT
                            , $ind, $total, $class, $message);
                    }

                    $content .= <<<EOT
                        <div>
                            <table class="table table-bordered table-striped"><tbody>
EOT;

                    foreach ($e['trace'] as $trace) {
                        $i++;
                        $content .= '       <tr><td>' . $i . '</td><td>';
                        if ($trace['function']) {
                            $content .= sprintf('at %s%s%s(%s)', $this->abbrClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args']));
                        }
                        if (isset($trace['file']) && isset($trace['line'])) {
                            if ($linkFormat = ini_get('xdebug.file_link_format')) {
                                $link = str_replace(array('%f', '%l'), array($trace['file'], $trace['line']), $linkFormat);
                                $content .= sprintf(' in <a href="%s" title="Go to source">%s line %s</a>', $link, $trace['file'], $trace['line']);
                            } else {
                                $content .= sprintf(' in %s line %s', $trace['file'], $trace['line']);
                            }
                        }
                        $content .= "</td</tr>\n";
                    }

                    $content .= "    </tbody></table>\n</div>\n";
                }
            } catch (\Exception $e) {
                // something nasty happened and we cannot throw an exception anymore
                if ($this->debug) {
                    $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($exception), $exception->getMessage());
                } else {
                    $title = "Uh oh something's broken";
                }
            }
        }

        list($quote, $author) = $this->getQuote();
        $statusCode           = $exception->getStatusCode();
        $ppiLogo              = $this->getPpiLogo();

        return <<<EOF
            <div class="page-header well">
                <h1 title="An exception has occurred - Code $statusCode"><img src="$ppiLogo" height="56" width="89">&nbsp;$title.</h1>
                <p class="muted quote"><i>"$quote"</i> &mdash; $author</p>
            </div>
            <div class="ppi-container well">
                $content
            </div>
EOF;
    }
680571
private function findNumberOfSentMails() {
        $sendCount = 0;
        if ($this->messageFormat->getVersion() === 'v3.1') {
            $messages = $this->resultApi->getBody()['Messages'];
            foreach ($messages as $message) {


                if (isset($message['To'])) {
                    $sendCount += count($message['To']);
                }
                if (isset($message['Bcc']) && (!empty($message['Bcc']))) {
                    $sendCount += count($message['Bcc']);
                }
                if (isset($message['Cc']) && (!empty($message['Cc']))) {
                    $sendCount += count($message['Cc']);
                }
            }
            return $sendCount;
        }
        if ($this->messageFormat->getVersion() === 'v3') {
            if (isset($this->resultApi->getBody()['Sent'])) {
                $sendCount += count($this->resultApi->getBody()['Sent']);
            }
            return $sendCount;
        }
        return $sendCount;
    }
181527
public function getAllAnnotations($pageNumber)
    {

        $iTotalAnnotation = $this->GetAnnotationsCount($pageNumber);
        $listAnnotations = array();
        for ($index = 1; $index <= $iTotalAnnotation; $index++) {
            array_push($listAnnotations, $this->GetAnnotation($pageNumber, $index));
        }
        return $listAnnotations;
    }
442061
public static function getChildElements($element, $withText = false)
    {
        $children = $element->childNodes;
        $returnValue = array();
        
        for ($i = 0; $i < $children->length; $i++) {
            if ($children->item($i)->nodeType === XML_ELEMENT_NODE || ($withText === true && ($children->item($i)->nodeType === XML_TEXT_NODE || $children->item($i)->nodeType === XML_CDATA_SECTION_NODE))) {
                $returnValue[] = $children->item($i);
            }
        }
        
        return $returnValue;
    }
276218
public function getChildren($filterEmptyDOMText = false)
    {
        $ret = iterator_to_array($this->childNodes);
        if ($filterEmptyDOMText) {
            // Array values is used to discard the key order. Needs to be 0 to whatever without skipping any number
            $ret = array_values(array_filter($ret, function ($node) {
                return $node->nodeName !== '#text' || mb_strlen(trim($node->nodeValue));
            }));
        }

        return $ret;
    }
1212951
public function getByOrder(string $orderBy, array $where = [], array $with = [], string $order = 'desc', int $limit = 0)
    {
        $query = $this->make($with);

        $query = $this->applyWhere($query, $where);

        $query = $query->orderBy($orderBy, $order);

        if ($limit) {
            $query = $query->take($limit);
        }

        return $query->get();
    }
456788
public function getIndexQueuePagesExcludeContentByClassArray($defaultIfEmpty = [])
    {
        $path = 'plugin.tx_solr.index.queue.pages.excludeContentByClass';
        $result = $this->getValueByPathOrDefaultValue($path, '');

        if (trim($result) === '') {
            return $defaultIfEmpty;
        }

        return GeneralUtility::trimExplode(',', $result);
    }
456075
public function getColorScheme($slideNumber, $storageName = '')
    {


        //Build URI to get color scheme
        $strURI = Product::$baseProductUri . '/slides/' . $this->getFileName() . '/slides/' . $slideNumber . '/theme/colorScheme';
        if ($storageName != '') {
            $strURI .= '?storage=' . $storageName;
        }
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        return $json->ColorScheme;
    }
448637
public function getContent($textquery, $parameters = [], &$pager = [], $whereparameters = [])
    {
        if ($this->legacyStorage !== null) {
            return $this->legacy()->getContent($textquery, $parameters, $pager, $whereparameters);
        } elseif ($this->queryService !== null) {
            return $this->queryService->getContent($textquery, array_merge($parameters, $whereparameters));
        }

        throw new \Exception('Legacy service nor Query service loaded');
    }
603827
public function getAllLinks($pageNumber)
    {

        $iTotalLinks = $this->GetLinksCount($pageNumber);
        $listLinks = array();
        for ($index = 1; $index <= $iTotalLinks; $index++) {
            array_push($listLinks, $this->GetLink($pageNumber, $index));
        }
        return $listLinks;
    }
1247681
public function listCollections(array $pWithFields = array())
    {
        $tables = array();

        $prepared = $this->getConnection()->prepare('SHOW TABLES FROM `' . $this->_dbName . '`');
        if ($prepared->execute()) {
            while ($row = $prepared->fetchObject()) {
                $table = str_replace($this->getDbPrefix(), '', current($row));

                foreach ($pWithFields as $field) {
                    $preparedJoin = $this->getConnection()->prepare('SHOW COLUMNS FROM `' . current($row) . '` LIKE "' . $field . '"');
                    $preparedJoin->execute();
                    if ($preparedJoin->execute() and ! $preparedJoin->rowCount()) {
                        continue 2;
                    }
                }

                $tables[] = $table;
            }

        }

        return $tables;
    }
662945
public function getMessages($withWarning=false) {
		if ($withWarning) $this->messageList->allErrorOrWarningArray();
		return $this->messageList->allErrorArray();
	}
1293536
public static function values($withEmpty = false)
    {
        $values = parent::values($withEmpty);

        // Correct some display values
        $values[static::WHAPSAPP] = 'WhatsApp';
        $values[static::IMESSAGE] = 'iMessage';
        $values[static::QQ] = 'QQ';
        $values[static::BLACKBERRY] = 'BlackBerry';
        $values[static::AIM] = 'AIM';
        $values[static::EBUDDY] = 'eBuddy';

        return $values;
    }
295534
public static function getScheduledAClassContentInsertions(EntityManager $em, $with_revision = false, $exclude_base_element = false)
    {
        $entities = array();
        foreach ($em->getUnitOfWork()->getScheduledEntityInsertions() as $entity) {
            if (false !== $tmp = self::getScheduledEntity($entity, $with_revision, $exclude_base_element)) {
                $entities[] = $tmp;
            }
        }

        return $entities;
    }
665079
public function get_display_name($item, $withpostfix = true) {
        return format_text($item->name, FORMAT_HTML, array('noclean' => true, 'para' => false)) .
                ($withpostfix ? $this->get_display_name_postfix($item) : '');
    }
207983
function getSubjectDNProp($propName, $withType = false)
    {
        switch (true) {
            case !empty($this->dn):
                return $this->getDNProp($propName, NULL, $withType);
            case !isset($this->currentCert) || !is_array($this->currentCert):
                break;
            case isset($this->currentCert['tbsCertificate']):
                return $this->getDNProp($propName, $this->currentCert['tbsCertificate']['subject'], $withType);
            case isset($this->currentCert['certificationRequestInfo']):
                return $this->getDNProp($propname, $this->currentCert['certificationRequestInfo']['subject'], $withType);
        }

        return false;
    }