Retrieve all history
@throws EnvironnementResolverException
@return HistoryCollection
550753
public function findAll()
    {
        if ($this->fileManager->isDir(Installer::BASE_PATH . self::HISTORY_PATH) === false) {
            throw new EnvironnementResolverException(
                sprintf(
                    'Unable to locate "%d"',
                    Installer::BASE_PATH . self::HISTORY_PATH
                )
            );
        }

        $historyCollection = new HistoryCollection();
        $searchPath        = Installer::BASE_PATH . self::HISTORY_PATH . '*' . self::FILE_EXTENSION;

        foreach ($this->fileManager->glob($searchPath) as $file) {
            $content = $this->fileManager->fileGetContent($file);

            try {
                $historyCollection->append($this->historyHydrator->jsonToDTO($content));
            } catch (InvalidHistoryException $e) {
                continue;
            }
        }

        return $historyCollection;
    }
1218365
public function getCollection()
    {
        return $this->resolve(Collection::class)
            ->setDatabase($this->database)
            ->setTable($this->table)
            ->set($this->getRows());
    }
1238642
@GET
    @Path("history")
    public List<APIConnectionRecord> getConnectionHistory()
            throws GuacamoleException {

        // Retrieve the requested connection's history
        List<APIConnectionRecord> apiRecords = new ArrayList<APIConnectionRecord>();
        for (ConnectionRecord record : connection.getHistory())
            apiRecords.add(new APIConnectionRecord(record));

        // Return the converted history
        return apiRecords;

    }

    /**
     * Returns a resource which provides read-only access to the subset of
     * SharingProfiles that the current user can use to share this connection.
     *
     * @return
     *     A resource which provides read-only access to the subset of
     *     SharingProfiles that the current user can use to share this
     *     connection.
     *
     * @throws GuacamoleException
     *     If the SharingProfiles associated with this connection cannot be
     *     retrieved.
     */
    @Path("sharingProfiles")
    public DirectoryResource<SharingProfile, APISharingProfile>
            getSharingProfileDirectoryResource() throws GuacamoleException {

        // Produce subset of all SharingProfiles, containing only those which
        // are associated with this connection
        Directory<SharingProfile> sharingProfiles = new DirectoryView<SharingProfile>(
            userContext.getSharingProfileDirectory(),
            connection.getSharingProfileIdentifiers()
        );

        // Return a new resource which provides access to only those SharingProfiles
        return sharingProfileDirectoryResourceFactory.create(userContext, sharingProfiles);

    }

}
141254
public function logCollectorStates()
    {
        $url = self::makeUrl();
        $result = array();
        try {
            $response = $this->service->prepAndSend($url, array(200), "GET", null, true);
            $responseObject = json_decode($response);

            foreach ($responseObject->CollectorSettingsList as $lcs) {
                $result[] = LogCollectorSettings::createFromJSON($lcs);
            }

            /*
             * For now a facade has been created over this REST endpoint to return an empty array
             * in the case that we get a 404 with the message "Resource collectors not found"
             */
        } catch (RESTRequestException $e) {
            if ($e->message == "Resource collectors not found" && $e->statusCode == 404) {
                return $result;
            } else {
                throw $e;
            }
        }
        return $result;
    }
176884
public function getAncestors()
    {
        $ancestors = new Collection();

        $ancestor = $this;

        while (($ancestor = $ancestor->parent) && !$ancestors->contains($ancestor)) {
            $ancestors->push($ancestor);
            break;
        }

        return $ancestors;
    }
522149
public function getStoryMappingMapper()
    {
        if (null === $this->storyMappingMapper) {
            $this->storyMappingMapper = $this->serviceLocator->get('playgroundflow_storymapping_mapper');
        }
    
        return $this->storyMappingMapper;
    }
373246
public function getCollections()
    {
        $cursor = $this->server->executeCommand($this->database,
            new \MongoDb\Driver\Command(['listCollections' => 1]));
        $cursor->setTypeMap(['root' => 'array', 'document' => 'array']);

        $result = new \IteratorIterator($cursor);

        $this->queriesResultCache[ 'collectionNames' ] = [];

        foreach ($result as $collection) {
            if ($collection[ 'type' ] === 'collection') {
                $this->queriesResultCache[ 'collectionNames' ][] = $collection[ 'name' ];
            }
        }

        return $this->queriesResultCache[ 'collectionNames' ];
    }
853718
public function getRouteCollection()
    {
        if (($this->otherSite && $this->isMultiLanguage($this->otherSite['host'])) || !$this->otherSite && $this->isMultiLanguage()) {
            if (!$this->routeCollectionMultiLanguage) {
                $this->routeCollectionMultiLanguage = new RouteCollection();

                $this->addMultiLangPreviewRoute();
                $this->addMultiLangSlugRoute();
            }

            return $this->routeCollectionMultiLanguage;
        } elseif (!$this->routeCollection) {
            $this->routeCollection = new RouteCollection();

            $this->addPreviewRoute();
            $this->addSlugRoute();
        }

        return $this->routeCollection;
    }
153149
public function getCollectionList()
    {
        $cArray = [];
        $bID = $this->getBlockID();
        if ($bID) {
            $db = Loader::db();
            $q = 'select DISTINCT Pages.cID from CollectionVersionBlocks inner join Pages on (CollectionVersionBlocks.cID = Pages.cID) inner join CollectionVersions on (CollectionVersions.cID = Pages.cID) where CollectionVersionBlocks.bID = ?';
            $r = $db->query($q, [$bID]);
            if ($r) {
                while ($row = $r->fetchRow()) {
                    $cArray[] = Page::getByID($row['cID'], 'RECENT');
                }
                $r->free();
            }
        }

        return $cArray;
    }
306030
def history(self):
        
        res = self._api_request('hist')
        if res[0][0] == '-1':
            raise PuushError("History retrieval failed.")
        
        files = []
        for line in res[1:]:
            id, upload_time, url, filename, views, _ = line
            files.append(self._File(id, url, filename, upload_time, views))
        return files
331098
@GET
    @Path("{id}/history")
    public Response fetchHistory(@PathParam("id") URI_ID id) throws Exception {
        return super.fetchHistory(id);
    }
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");
    }
187968
public List<File> getInactiveHistory() throws PatchingException {
        if (validHistory == null) {
            walk();
        }
        final File[] inactiveDirs = installedIdentity.getInstalledImage().getPatchesDir().listFiles(new FileFilter() {
            @Override
            public boolean accept(File pathname) {
                return pathname.isDirectory() && !validHistory.contains(pathname.getName());
            }
        });
        return inactiveDirs == null ? Collections.<File>emptyList() : Arrays.asList(inactiveDirs);
    }
47933
protected function getCollection(): Collection
    {
        $conn = $this->connPool->getConnection();
        $database = $conn->defaultDatabase;
        $collection = $this->schema->collection;

        return $conn->getRawConnection()->$database->$collection;
    }
1186902
private function &getCollection()
    {
        if (null === $this->collection) {
            $qb = $this->createAndFilterQueryBuilder($this->getEntityAlias());
            if ($this->isHydrationDisabled()) {
                $this->collection = $qb->getQuery()->getScalarResult();
            } else {
                $this->collection = $qb->getQuery()->getResult();
            }
        }
        return $this->collection;
    }
305859
public function actionHistory()
    {
        $history = $this->wrappedObject->actions()->get();

        return $this->presenter->decorate($history);
    }
1187690
public function toCollection() {
		$data  = iterator_to_array($this->_iterator);
		$model = $this->getModel();
		
		$collection = new Collection($data, $model);

		if ($this->hasDatagate()) {
			$collection->setDatagate($this->getDatagate());
		}
		
		if ($this->hasLocator()) {
			$collection->setLocator($this->getLocator());
		}
		
		return $collection;
	}