Setting up environment for common libraries in Yii

I would like to build structure for 3 projects . 2 of them are plain Yii web applications. Besides I would also like to have project (or just directory) with common files like forms (for example UserForm), different helpers, base class for ActiveRecord with some extra functionality etc, probably also Test Cases.

I would have directories like this

WEBAPP1

-protected

-tests

-public

WEBAPP2

-protected

-tests

-public

LIBRARIES

-sources

-tests

I don’t know wheter to setup PATH for libraries somewhere in project configs or maybe configure autoload somehow or solve it another way.

I would like to run tests in this "Libraries" project and do not have any typical web application folders (like controllers, themes, data, runtime etc)

Maybe some of you have configured project in similar way and can describe solution. I mention that I’ve read some tutorials about setting up multi-project environment but none of them was exactly what I was looking for.

Thanks in advance.

See this wiki article.

You can think of backend and frontend as your webapp1 and webapp2 and common is libraries in your structure.