public function findAll()
    {
        $ext       = $this->formatter->getFileExtension();
        $files     = $this->getAllFiles();
        $documents = array();

        foreach ($files as $file) {
            $fp       = fopen($file, 'r');
            $contents = fread($fp, filesize($file));
            fclose($fp);

            $data = $this->formatter->decode($contents);

            if (null !== $data) {
                $doc = new $this->documentClass((array) $data);
                $doc->setId($this->getIdFromPath($file, $ext));

                $documents[] = $doc;
            }
        }

        return $documents;
    }
public function findAll()
    {
        $ext       = $this->formatter->getFileExtension();
        $files     = $this->getAllFiles();
        $documents = array();

        foreach ($files as $file) {
            $fp       = fopen($file, 'r');
            $contents = fread($fp, filesize($file));
            fclose($fp);

            $data = $this->formatter->decode($contents);

            if (null !== $data) {
                $doc = new $this->documentClass((array) $data);
                $doc->setId($this->getIdFromPath($file, $ext));

                $documents[] = $doc;
            }
        }

        return $documents;
    }
public function findAll ( ) { $ ext = $ this -> formatter -> getFileExtension ( ) ; $ files = $ this -> getAllFiles ( ) ; $ documents = array ( ) ; foreach ( $ files as $ file ) { $ fp = fopen ( $ file , 'r' ) ; $ contents = fread ( $ fp , filesize ( $ file ) ) ; fclose ( $ fp ) ; $ data = $ this -> formatter -> decode ( $ contents ) ; if ( null !== $ data ) { $ doc = new $ this -> documentClass ( ( array ) $ data ) ; $ doc -> setId ( $ this -> getIdFromPath ( $ file , $ ext ) ) ; $ documents [ ] = $ doc ; } } return $ documents ; }
Returns all the documents within this repo.

@return array An array of Documents.
Returns all the documents within this repo .