./script/solar link-vendor
VendorName
link-vendor
命令为Solar系统中的某个工作区创建一系列标准符号链接。如果你从其他项目中拷贝工作区文件到你的source
目录,此时你在include
目录中是不能访问他们的,同时在docroot/public
目录中也无法访问公共资源。该命令就是为你创建符号链接以便你在这些目录能够访问他们。(使用make-vendor命令时会自动调用link-vendor命令来完成符号链接的创建工作)
要链接某个工作区的源码,输入以下代码:
$ ./script/solar link-vendor VendorName Making links for vendor 'VendorName' ... Making link 'include/VendorName' ... done. Making link 'include/Test/VendorName' ... done. Making link 'include/Mock/VendorName' ... done. Making link 'include/Fixture/VendorName' ... done. Making link 'script/vendor-name' ... done. ... done. Making public symlinks for 'VendorName' ... Making public directory docroot/public/VendorName/Controller ... done. Making public symlink for VendorName_Controller_Bread ... done. Making public symlink for VendorName_Controller_Page ... done. ... done. Remember to add 'VendorName_App' to the ['Solar_Controller_Front']['classes'] element in your config file so that it finds your apps. Remember to add 'VendorName_Model' to the ['Solar_Sql_Model_Catalog']['classes'] element in your config file so that it finds your models. $
上面的命令做了什么?
-
该命令创建从
include/
目录到/source
目录的符号链接,包括:测试用例、测试模拟和测试设备。它同时创建命令行工具的符号链接以使该命令行工具可用。 -
同时,该命令还在
docroot/public
目录下为所有PHP类的Public/
目录创建符号链接,以使所有公共资源可以通过web访问。