Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Application.php

function Application::extractNamespace

Returns the namespace part of the command name.

This method is not part of public API and should not be used directly.

1 call to Application::extractNamespace()
Application::all in vendor/symfony/console/Application.php
Gets the commands (registered in the given namespace if provided).

File

vendor/symfony/console/Application.php, line 1179

Class

Application
An Application is the container for a collection of commands.

Namespace

Symfony\Component\Console

Code

public function extractNamespace(string $name, ?int $limit = null) : string {
    $parts = explode(':', $name, -1);
    return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal