Puli\Repository\AbstractJsonRepository::listChildren PHP Method

listChildren() public method

public listChildren ( $path )
    public function listChildren($path)
    {
        if (null === $this->json) {
            $this->load();
        }
        $path = $this->sanitizePath($path);
        $results = $this->createResources($this->getReferencesInDirectory($path));
        if (empty($results)) {
            $pathResults = $this->getReferencesForPath($path);
            if (empty($pathResults)) {
                throw ResourceNotFoundException::forPath($path);
            }
        }
        ksort($results);
        return new ArrayResourceCollection(array_values($results));
    }