当前位置: 首页>>代码示例>>PHP>>正文


PHP Assert::directory方法代码示例

本文整理汇总了PHP中Webmozart\Assert\Assert::directory方法的典型用法代码示例。如果您正苦于以下问题:PHP Assert::directory方法的具体用法?PHP Assert::directory怎么用?PHP Assert::directory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Webmozart\Assert\Assert的用法示例。


在下文中一共展示了Assert::directory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($filesystemPath, $path = null)
 {
     Assert::directory($filesystemPath);
     parent::__construct($filesystemPath, $path);
 }
开发者ID:SenseException,项目名称:repository,代码行数:8,代码来源:DirectoryResource.php

示例2: setAsciiDocDir

 /**
  * Sets the directory containing the AsciiDoc pages.
  *
  * @param string $dir The directory that contains the AsciiDoc pages.
  */
 public function setAsciiDocDir($dir)
 {
     Assert::directory($dir);
     $this->asciiDocDir = $dir;
 }
开发者ID:webmozart,项目名称:console,代码行数:10,代码来源:HelpHandler.php

示例3: __construct

 /**
  * Creates a new repository.
  *
  * @param string            $baseDir      The base directory of the repository on the file
  *                                        system.
  * @param bool              $symlink      Whether to use symbolic links for added files. If
  *                                        symbolic links are not supported on the current
  *                                        system, the repository will create hard copies
  *                                        instead.
  * @param bool              $relative     Whether to create relative symbolic links. If
  *                                        relative links are not supported on the current
  *                                        system, the repository will create absolute links
  *                                        instead.
  * @param ChangeStream|null $changeStream If provided, the repository will log
  *                                        resources changes in this change stream.
  */
 public function __construct($baseDir = '/', $symlink = true, $relative = true, ChangeStream $changeStream = null)
 {
     parent::__construct($changeStream);
     Assert::directory($baseDir);
     Assert::boolean($symlink);
     $this->baseDir = rtrim(Path::canonicalize($baseDir), '/');
     $this->baseDirLength = strlen($baseDir);
     $this->symlink = $symlink && self::isSymlinkSupported();
     $this->relative = $this->symlink && $relative;
     $this->filesystem = new Filesystem();
 }
开发者ID:puli,项目名称:repository,代码行数:27,代码来源:FilesystemRepository.php

示例4: __construct

 /**
  * Creates a new repository.
  *
  * @param string $baseDir  The base directory of the repository on the file
  *                         system.
  * @param bool   $symlink  Whether to use symbolic links for added files. If
  *                         symbolic links are not supported on the current
  *                         system, the repository will create hard copies
  *                         instead.
  * @param bool   $relative Whether to create relative symbolic links. If
  *                         relative links are not supported on the current
  *                         system, the repository will create absolute links
  *                         instead.
  */
 public function __construct($baseDir = '/', $symlink = true, $relative = true)
 {
     Assert::directory($baseDir);
     Assert::boolean($symlink);
     $this->baseDir = rtrim(Path::canonicalize($baseDir), '/');
     $this->symlink = $symlink && self::isSymlinkSupported();
     $this->relative = $this->symlink && $relative;
     $this->filesystem = new Filesystem();
 }
开发者ID:SenseException,项目名称:repository,代码行数:23,代码来源:FilesystemRepository.php


注:本文中的Webmozart\Assert\Assert::directory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。