<?php

class knowledge_model extends Cf_Model
{
    /**
     *
     */
    function listDocuments($path = '')
    {

        try
        {
            $result = cfpr_list_documents($path);
            $data = $this->checkData($result);
            if (is_array($data) && $this->hasErrors() == 0)
            {
                return $data;
            }
            else
            {
                throw new Exception($this->getErrorsString());
            }
        }
        catch (Exception $e)
        {
            log_message(log_level_for_exception($e), $e->getMessage() . " " . $e->getFile() . " line:" . $e->getLine());
            throw $e;
        }
    }
}

?>
