I’ve been doing a lot of development work recently for clients based on Known which involve, among other things, needing to do fairly involved things with data and ACLs.

Because of this, I was finding myself spending a lot of time trying to see what was actually written to entities by looking at the raw database. This was rather time consuming, and because of Known’s (very flexible but abstract) data model, was rather tricky.

So, I took advantage of Known’s console interface (which I fixed and extended in a recent pull request), to start putting together a collection of useful tools. To use, simply symlink to the appropriate directory from within you ConsolePlugins directory.

Be aware that you will need the current latest version of Known core from Github.

» Visit the project on Github...

A big piece of functionality that people have been asking for in Known (and that I actually needed to start building out for some client work), was the ability to add a “draft” published status on a post, which was separate from “PRIVATE” in an ACL context.

To start building this out I introduced the concept of publish_status (defaulting to “published”) on an Entity. Originally I implemented this as a piece of metadata, however since this had issues with filtering queries by “NOT ‘draft'” owing to this bug, I’m proposing a new pull request which implements the same functionality as a collection level schema change.

This obviously requires some DB patches to be applied, but it is both more efficient and more flexible.

Sessions are, in many bits of web software, used to store the details of the currently logged in user, and to provide the concept of a user being logged in and logged out. Known is no exception in this.

These sessions need to be stored, in some way, on the server. Usually this is either stored in files, or in a database.

Known currently has the ability to store sessions in the currently enabled database engine (Mysql, mongo etc), or in files. However, for various reasons (e.g. you want to use a different database engine to store sessions, or you want to implement a fancy session store), it would be useful to decouple the sessions from the database.

This pull request adds the ability to specify, in your config.ini, a handler class implementing the Idno\Common\SessionStorageInterface interface.

This new class can then implement a session handler which uses a different storage engine, other than just files and the current database.