function Inspector::assertAllStrings

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllStrings()
  2. 8.9.x core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllStrings()
  3. 10 core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllStrings()

Asserts that all members are strings.

Use this only if it is vital that the members not be objects, otherwise test with ::assertAllStringable().

Parameters

mixed $traversable: Variable to be examined.

Return value

bool TRUE if $traversable can be traversed and all members are strings.

24 calls to Inspector::assertAllStrings()
ApcuBackend::set in core/lib/Drupal/Core/Cache/ApcuBackend.php
Stores data in the persistent cache.
Cache::mergeTags in core/lib/Drupal/Core/Cache/Cache.php
Merges arrays of cache tags and removes duplicates.
CacheCollector::__construct in core/lib/Drupal/Core/Cache/CacheCollector.php
Constructs a CacheCollector object.
CacheTagsInvalidator::invalidateTags in core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php
Marks cache items with any of the specified tags as invalid.
CKEditor4To5UpgradePluginManager::validateAndBuildMaps in core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginManager.php
Validates plugin definitions: avoids conflicts. Builds maps for later use.

... See full list

File

core/lib/Drupal/Component/Assertion/Inspector.php, line 64

Class

Inspector
Generic inspections for the <a href="http://php.net/assert" target="_blank" class="php-manual" title="void assert(string $assertion [, string $description = &#039;&#039;, string $file, int $line]) Checks an assertion">assert</a>() statement.

Namespace

Drupal\Component\Assertion

Code

public static function assertAllStrings($traversable) {
    return static::assertAll('is_string', $traversable);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.