initialize database only

Hello everyone!

I'm writing a simple php page that just returns a value from the Omeka db to an AJAX call, so I guessed that a full bootstrap of the application (with themes and other stuff) wouldn't be needed.

I've found this function which seems to be very useful to accomplish my task: Omeka_Core's initializeDb() ( ).

Could anyone tell me how to set it up? For example, do I have to initialize it by passing some parameters via getBootstrap()->setOptions() before calling initializeDb()->run()? If yes, which ones?

Sorry, I know it might be a trivial question but I feel a bit lost after searching the documentation and making some attempts.

Thank you in advance for your help.

What version of Omeka are you working with? Omeka_Core is an old file (you linked to documentation from version 1.0), and no longer exists in current versions.

As for loading only specific resources, you should look into Zend's documentation for Zend_Application, and some Omeka files such as application/scripts/background.php for examples.

It may be simpler to just provide your AJAX endpoint in a standard Omeka plugin. You would incur the overhead of loading the application, but this isn't an unreasonable cost to bear.