Back to Registry class

Method hasService

public bool
hasService
(string $key)
Check if the registry has a service for the given key
Parameters
  • string $key The service key to look up
Returns
  • bool
Since
  • 4.0.0
Class: Registry
Project: Joomla

Method hasService - Source code

/**
 * Check if the registry has a service for the given key
 *
 * @param   string  $key  The service key to look up
 *
 * @return  boolean
 *
 * @since   4.0.0
 */
public function hasService(string $key) : bool
{
    return isset($this->serviceMap[$key]);
}