Access the documents

@return \Twilio\Rest\Preview\Sync\Service\DocumentList
492601
protected function getDocuments() {
        if (!$this->_documents) {
            $this->_documents = new DocumentList($this->version, $this->solution['sid']);
        }

        return $this->_documents;
    }
738042
public function getItems()
    {
        if ($this->items === null) {
            $fusionContext = $this->runtime->getCurrentContext();
            $this->currentNode = isset($fusionContext['activeNode']) ? $fusionContext['activeNode'] : $fusionContext['documentNode'];
            $this->currentLevel = 1;
            $this->items = $this->buildItems();
        }

        return $this->items;
    }
125061
public function getList()
    {
        $list = $this->doc->getList();
        $list = $this->setIcon($list);
        return response(['firstId'=>'', 'list'=>$list], 200, [], 'json');
    }
1243738
public function getDocumentProperties()
    {

        //build URI to replace image
        $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/documentProperties';

        //sign URI
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $response_arr = json_decode($responseStream);

        return $response_arr->DocumentProperties->List;
    }
1075517
public function getIndexedDocuments()
    {
        $db = $this->getSearchDbHandle();
        $sql = '
			SELECT count(DISTINCT documentPath) AS indexedDocuments
			  FROM term_frequency
		';
        if (!$stmt = $db->query($sql)) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        $result = $stmt->fetch(\PDO::FETCH_COLUMN);
        if (false === $result) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        return (int)$result;
    }
1226299
public function documentlist()
    {
        if (!$this->getRequest()->getVar('pageID')) {
            return $this->httpError(400);
        }

        $page = SiteTree::get()->byId($this->getRequest()->getVar('pageID'));

        if ($page && $page->getAllDocuments()->count() > 0) {
            $list = '<ul>';

            foreach ($page->getAllDocuments() as $document) {
                $list .= sprintf(
                    '<li><a class="add-document" data-document-id="%s">%s</a></li>',
                    $document->ID,
                    $document->ID . ' - '. Convert::raw2xml($document->Title)
                );
            }

            $list .= '</ul>';

            return $list;
        }

        return sprintf(
            '<p>%s</p>',
            _t('DMSDocumentAddController.NODOCUMENTS', 'There are no documents attached to the selected page.')
        );
    }
38154
public function index()
    {
        if ($this->isEmpty()) {
            return false;
        }

        $params = array();

        foreach ($this->all() as $item) {
            $params['body'][] = array(
                'index' => array(
                    '_index' => $item->getIndex(),
                    '_type' => $item->getTypeName(),
                    '_id' => $item->getKey()
                )
            );

            $params['body'][] = $item->documentFields();
        }

        return $this->getElasticClient()->bulk($params);
    }
55157
public function getDocument()
    {
        $this->processRequestParameters();

        if ($this->treeStructure instanceof \ArrayObject) {
            $this->builderContext = new \Genesis\Builder();
            $this->builderContext->parseStructure($this->treeStructure->getArrayCopy());

            return $this->builderContext->getDocument();
        }

        return null;
    }
1188230
public function getFiles()
    {
        if(!$this->isPropertyAvailable('Files')){
            $this->setProperty("Files", new FileCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "Files")));
        }
        return $this->getProperty("Files");
    }
1028912
public function indexAction() {
        $oid = new ObjectIdentity('class', 'FOM\UserBundle\Entity\Group');

        $query = $this->getDoctrine()->getManager()->createQuery('SELECT g FROM FOMUserBundle:Group g');
        $groups = $query->getResult();
        $allowed_groups = array();
        // ACL access check
        foreach($groups as $index => $group) {
            if($this->get('security.authorization_checker')->isGranted('VIEW', $group)) {
                $allowed_groups[] = $group;
            }
        }

        return array(
            'groups' => $allowed_groups,
            'create_permission' => $this->get('security.authorization_checker')->isGranted('CREATE', $oid)
        );
    }
1021244
public function getAllDocument(): Core\ViewResource
    {
        return new Core\ViewResource(array(
            'head' => $this->getHead()->asArray,
            'content' => $this->getAllContent()->asArray,
        ), 'asJSON');
    }
645942
public function getList(): array {
        $list = array();
        $dir = $this->_docRoot . $this->_path;
        if (is_dir($dir)) {
            if ($dh = opendir($dir)) {
                while (($file = readdir($dh)) !== false) {
                    if (substr($file, 0, 1) !== '.'
                        && strpos($file, '.') !== false
                    ) {
                        $list[] = $file;
                    }
                }
                closedir($dh);
            }
        } else {
            throw new Exception($dir . ' is not a directory.');
        }

        return $list;
    }
569092
public function getList()
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        $mode = $this->params('mode', false);
        $type = $this->params('type', false);
        $endpoint = $this->params('endpoint', false);
        $annee = $this->params('annee', 0);
        $processHandler = $this->getProcessStateHandler();
        $executions = $processHandler->getProcessExecutions($mode, $type, $endpoint, $annee);
        if ($executions instanceof \Doctrine\ORM\PersistentCollection)
            $executions = $executions->toArray();
        usort($executions, function (Execution $a, Execution $b)
        {
            return intval($a->getId()) < intval($b->getId());
        });
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $processJson = $serializer->serialize($executions, 'json');
        $response->setContent($processJson);
        return $response;
    }
326579
public function getIterator()
    {
        //Run the query
        $resp = $this->query->execute();

        //Return the documents as an ArrayIterator to satisfy the requirements
        //of the getIterator function.
        foreach ($resp->data as $document)
        {
            yield $document;
        }

        while ($resp->cursors->next) {
            //send a new request, resetting $resp
            $resp = $this->query->execute($resp->cursors->next);

            foreach ($resp->data as $document)
            {
                yield $document;
            }
        }
    }
559634
public function all()
    {
        $result = [];
        foreach ($this->collection->find() as $document) {
            $result[] = [
                'program' => $document['program'],
                'process' => $document['process'],
            ];
        }
        return $result;
    }
391670
protected function getJsonDocumentList()
    {
        if (!isset($this->config['library'])) {
            return json_encode(static::$apiResponseBody, JSON_PRETTY_PRINT);
        }

        if (!count($this->config['library'])) {
            return json_encode(static::$apiResponseBody, JSON_PRETTY_PRINT);
        }

        foreach (array_keys($this->config['library']) as $document) {
            static::$apiResponseBody['data'][] = [
                'document' => $document,
                'link' => Router::url([
                    'plugin' => 'Alt3/Swagger',
                    'controller' => 'Docs',
                    'action' => 'index',
                    $document
                ], true)
            ];
        }

        return json_encode(static::$apiResponseBody, JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES);
    }
1349301
def get_document_list(self):
        
        try:
            return self.__dict__['document_list']
        except KeyError:
            obj_list = DocumentSet([
                self._connection.documents.get(i) for i in self.document_ids
            ])
            self.__dict__['document_list'] = obj_list
            return obj_list