本文整理汇总了PHP中Zend_Tool_Project_Context_Filesystem_Directory::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Tool_Project_Context_Filesystem_Directory::create方法的具体用法?PHP Zend_Tool_Project_Context_Filesystem_Directory::create怎么用?PHP Zend_Tool_Project_Context_Filesystem_Directory::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Tool_Project_Context_Filesystem_Directory
的用法示例。
在下文中一共展示了Zend_Tool_Project_Context_Filesystem_Directory::create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* create()
*
*/
public function create()
{
parent::create();
$zfPath = $this->_getZfPath();
if ($zfPath != false) {
$zfIterator = new RecursiveDirectoryIterator($zfPath);
foreach ($rii = new RecursiveIteratorIterator($zfIterator, RecursiveIteratorIterator::SELF_FIRST) as $file) {
$relativePath = preg_replace('#^' . preg_quote(realpath($zfPath), '#') . '#', '', realpath($file->getPath())) . DIRECTORY_SEPARATOR . $file->getFilename();
if (strpos($relativePath, DIRECTORY_SEPARATOR . '.') !== false) {
continue;
}
if ($file->isDir()) {
mkdir($this->getBaseDirectory() . DIRECTORY_SEPARATOR . $this->getFilesystemName() . $relativePath);
} else {
copy($file->getPathname(), $this->getBaseDirectory() . DIRECTORY_SEPARATOR . $this->getFilesystemName() . $relativePath);
}
}
}
}
示例2: create
public function create()
{
parent::create();
}
示例3: create
/**
* create()
*
* @return Zend_Tool_Project_Context_System_ProjectDirectory
*/
public function create()
{
if (file_exists($this->getPath())) {
/*
foreach (new DirectoryIterator($this->getPath()) as $item) {
if (!$item->isDot()) {
if ($registry->getClient()->isInteractive()) {
// @todo prompt for override
} else {
require_once 'Zend/Tool/Project/Context/Exception.php';
throw new Zend_Tool_Project_Context_Exception('This directory is not empty, project creation aborted.');
}
break;
}
}
*/
}
parent::create();
return $this;
}
示例4: create
/**
* create()
*
* @return Zend_Tool_Project_Context_System_ProjectDirectory
*/
public function create()
{
parent::create();
return $this;
}