1.3. Make a Vendor Space

In some other frameworks, you have a separate app or lib path where you put your project-specific files. Solar is library- and namespace-oriented, so you put all your non-Solar PHP files in the same place as the Solar ones, but under a different "vendor" space. In this demo tutorial, we will call our vendor Acme.

At the command line, in the SYSTEM directory, issue the make-vendor command. You will see output similar to the following:

$ ./script/solar make-vendor Acme
Making vendor source directories.
Creating SYSTEM/source/acme/config.
Creating SYSTEM/source/acme/docs.
Creating SYSTEM/source/acme/script.
Creating SYSTEM/source/acme/tests.
Creating SYSTEM/source/acme/tests/Mock.
Creating SYSTEM/source/acme/tests/Mock/Acme.
Creating SYSTEM/source/acme/tests/Test.
Creating SYSTEM/source/acme/tests/Test/Acme.
Creating SYSTEM/source/acme/Acme/Cli/Help.
Creating SYSTEM/source/acme/Acme/Cli/Help/Info.
Creating SYSTEM/source/acme/Acme/Cli/Help/Locale.
Creating SYSTEM/source/acme/Acme/Controller/Bread/Locale.
Creating SYSTEM/source/acme/Acme/Controller/Bread/Public.
Creating SYSTEM/source/acme/Acme/Controller/Bread/View.
Creating SYSTEM/source/acme/Acme/Controller/Command/Info.
Creating SYSTEM/source/acme/Acme/Controller/Command/Locale.
Creating SYSTEM/source/acme/Acme/Controller/Page/Layout.
Creating SYSTEM/source/acme/Acme/Controller/Page/Locale.
Creating SYSTEM/source/acme/Acme/Controller/Page/Public.
Creating SYSTEM/source/acme/Acme/Controller/Page/View.
Creating SYSTEM/source/acme/Acme/Model.
Writing SYSTEM/source/acme/Acme/Cli/Help.php ... done.
Writing SYSTEM/source/acme/Acme/Cli/Help/Info/options.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/Locale/en_US.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/_item.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/_list.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/add.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/browse.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/delete.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/edit.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/read.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Bread/View/search.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Command.php ... done.
Writing SYSTEM/source/acme/Acme/Controller/Page.php ... done.
Writing SYSTEM/source/acme/Acme/Filter.php ... done.
Making directory SYSTEM/source/acme/Acme/Sql ... done.
Writing SYSTEM/source/acme/Acme/Sql/Model.php ... done.
Making directory SYSTEM/source/acme/Acme/Sql/Model ... done.
Writing SYSTEM/source/acme/Acme/Sql/Model/Collection.php ... done.
Writing SYSTEM/source/acme/Acme/Sql/Model/Metadata.php ... done.
Writing SYSTEM/source/acme/Acme/Sql/Model/Record.php ... done.
Writing SYSTEM/source/acme/config/default.php ... done.
Writing SYSTEM/source/acme/config/run-tests.php ... done.
Writing SYSTEM/source/acme/Acme/Cli/Help/Info/help.txt ... done.
Making links for vendor 'Acme' ...
    Making link 'include/Acme' ... done.
    Making link 'include/Test/Acme' ... done.
    Making link 'include/Mock/Acme' ... done.
    Making link 'script/acme' ... done.
... done.
Making public symlinks for 'Acme' ...
    Making public directory docroot/public/Acme/Controller ... done.
    Making public symlink for Acme_Controller_Bread ... done.
    Making public symlink for Acme_Controller_Page ... done.
... done.
Remember to add 'Acme_App' to the ['Solar_Controller_Front']['classes'] element in your config file so that it finds your apps.
Remember to add 'Acme_Model' to the ['Solar_Sql_Model_Catalog']['classes'] element in your config file so that it finds your models.

[Note] Note

What happens here is that Solar creates the source/acme directory, with some basic Acme library classes for models and controllers, along with places for you to put view helpers, data filters, public assets, documentation, tests, and so on. Then Solar creates an include/Acme symlink pointing to that source. This is so that you can have non-library files in the source directory, but the include path will have only library files.