Webmozart\Assert\Assert::directory PHP Метод

directory() публичный статический Метод

public static directory ( $value, $message = '' )
    public static function directory($value, $message = '')
    {
        static::fileExists($value, $message);
        if (!is_dir($value)) {
            static::reportInvalidArgument(sprintf($message ?: 'The path %s is no directory.', static::valueToString($value)));
        }
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function __construct($filesystemPath, $path = null)
 {
     Assert::directory($filesystemPath);
     parent::__construct($filesystemPath, $path);
 }
All Usage Examples Of Webmozart\Assert\Assert::directory