src/snac/server/ServerExecutor.php
/**
     * Generate Report
     *
     * Generates the report asked for by the user, then stores it in the database for
     * later consumption.  A success/failure notice is returned to the user.  The user should
     * call readReport() to get the report back for viewing.
     *
     * @param string[] $input Input array from the Server object
     * @return string[] The response to send to the client
     */
Generate Report
Generates the report asked for by the user, then stores it in the database for
later consumption.  A success/failure notice is returned to the user.  The user should
call readReport() to get the report back for viewing.

@param string[] $input Input array from the Server object
@return string[] The response to send to the client
Generate Report Generates the report asked for by the user then stores it in the database for later consumption . A success / failure notice is returned to the user . The user should call readReport () to get the report back for viewing . @param string [] $input Input array from the Server object @return string [] The response to send to the client
public function generateReport(&$input) {
        $reportEngine = new \snac\server\reporting\ReportingEngine();
        $reportName = "General Report";
        switch ($input["type"]) {
            case "holdings":
                $reportName = "Holdings";
                $reportEngine->addReport("AllHoldingInstitutions");
                break;
            case "public":
                $reportName = "Public";
                $reportEngine->addReport("AllHoldingLocations");
                $reportEngine->addReport("NumConstellations");
                $reportEngine->addReport("NumConstellationsByType");
                $reportEngine->addReport("NumNewConstellationsThisWeek");
                $reportEngine->addReport("NumEditsThisWeek");
                $reportEngine->addReport("PublishesLastMonth");
                $reportEngine->addReport("ConstellationsConnectedResourcesPercentage");
                $reportEngine->addReport("ConstellationsConnectedConstellationsPercentage");
                break;
            case "general":
            default:
                $reportEngine->addReport("NumConstellations");
                $reportEngine->addReport("NumConstellationsByType");
                $reportEngine->addReport("TopEditorsThisWeek");
                $reportEngine->addReport("PublishesLastMonth");
                $reportEngine->addReport("TopHoldingInstitutions");
                $reportEngine->addReport("OutboundLinks");
                break;
        }
        $reportEngine->setPostgresConnector($this->cStore->sqlObj()->connectorObj());
        $report = json_encode($reportEngine->runReports(), JSON_PRETTY_PRINT);
        $this->cStore->storeReport($reportName, $report, $this->user);
        return array("result" => "success");
    }
public function generateReport ( & $ input ) { $ reportEngine = new \ snac \ server \ reporting \ ReportingEngine ( ) ; $ reportName = " General Report " ; switch ( $ input [ " type " ] ) { case " holdings " : $ reportName = " Holdings " ; $ reportEngine -> addReport ( " AllHoldingInstitutions " ) ; break ; case " public " : $ reportName = " Public " ; $ reportEngine -> addReport ( " AllHoldingLocations " ) ; $ reportEngine -> addReport ( " NumConstellations " ) ; $ reportEngine -> addReport ( " NumConstellationsByType " ) ; $ reportEngine -> addReport ( " NumNewConstellationsThisWeek " ) ; $ reportEngine -> addReport ( " NumEditsThisWeek " ) ; $ reportEngine -> addReport ( " PublishesLastMonth " ) ; $ reportEngine -> addReport ( " ConstellationsConnectedResourcesPercentage " ) ; $ reportEngine -> addReport ( " ConstellationsConnectedConstellationsPercentage " ) ; break ; case " general " : default : $ reportEngine -> addReport ( " NumConstellations " ) ; $ reportEngine -> addReport ( " NumConstellationsByType " ) ; $ reportEngine -> addReport ( " TopEditorsThisWeek " ) ; $ reportEngine -> addReport ( " PublishesLastMonth " ) ; $ reportEngine -> addReport ( " TopHoldingInstitutions " ) ; $ reportEngine -> addReport ( " OutboundLinks " ) ; break ; } $ reportEngine -> setPostgresConnector ( $ this -> cStore -> sqlObj ( ) -> connectorObj ( ) ) ; $ report = json_encode ( $ reportEngine -> runReports ( ) , JSON_PRETTY_PRINT ) ; $ this -> cStore -> storeReport ( $ reportName , $ report , $ this -> user ) ; return array ( " result " => " success " ) ; }
Generate Report
 Generates the report asked for by the user, then stores it in the database for
 later consumption.
Generate Report Generates the report asked for by the user then stores it in the database for later consumption .