public function isValid($name)
    {
        return is_string($name) && (preg_match(static::SERVICE_PATTERN, $name) || isset($this->app[$name]));
    }
public function isValid($name)
    {
        return is_string($name) && (preg_match(static::SERVICE_PATTERN, $name) || isset($this->app[$name]));
    }
public function isValid ( $ name ) { return is_string ( $ name ) && ( preg_match ( static :: SERVICE_PATTERN , $ name ) || isset ( $ this -> app [ $ name ] ) ) ; }
Returns true if the string is a valid service method representation.

@param string $name

@return bool
Returns true if the string is a valid service method representation .