Creates a name pattern for the resource type.<p>

@return String name-pattern
337103
private String getNamePattern() {

        String niceName = m_typeShortName.getValue();
        if (m_typeShortName.getValue().contains("-")) {
            int maxLength = 0;
            String[] nameParts = niceName.split("-");
            for (int i = 0; i < nameParts.length; i++) {
                if (nameParts[i].length() > maxLength) {
                    maxLength = nameParts[i].length();
                    niceName = nameParts[i];
                }
            }
        }
        return niceName + "_%(number).xml";
    }
170012
public function getIdAndClassPattern()
    {
        $id = $this->getAttribute('id');
        $class = $this->getAttribute('class');

        $pattern = '';
        if (!empty($id)) {
            $pattern = '#'.$id.'|#'.$id;
        }
        if (!empty($class)) {
            if (!empty($pattern)) {
                $pattern .= '.'.$class.'|';
            }
            $pattern .= '.'.$class;
        }

        return empty($pattern) ? null : '/('.$pattern.')/';
    }
825448
public function getNamePlural()
    {
        if (!empty($this->namePlural)) {
            return Piwik::translate($this->namePlural);
        }

        return $this->getName();
    }
303827
public function getNameSchemaService()
    {
        if ($this->nameSchemaService !== null) {
            return $this->nameSchemaService;
        }

        $this->nameSchemaService = new Helper\NameSchemaService(
            $this->persistenceHandler->contentTypeHandler(),
            $this->getContentTypeDomainMapper(),
            $this->getNameableFieldTypeRegistry(),
            $this->serviceSettings['nameSchema']
        );

        return $this->nameSchemaService;
    }
415688
protected XmlSchemaPatternFacet createPatternFacet(final String pattern) {
        XmlSchemaPatternFacet xmlSchemaPatternFacet = new XmlSchemaPatternFacet();
        xmlSchemaPatternFacet.setValue(pattern);
        return xmlSchemaPatternFacet;
    }
641764
protected static function compileValidPattern()
    {
        $user_info_pattern = UserInfo::getValidPattern();
        $host_pattern      = Host::getValidPattern();
        $port_pattern      = Port::getValidPattern();

        $reg_start = '/^$|^';   //allow for empty authority
        $reg_end   = '$/';

        self::$part_pattern =
            '((?\'user_info\'' . $user_info_pattern . ')@)?' .
            '(?\'host\'' . $host_pattern . ')' .
            '(:(?\'port\'' . $port_pattern . '))?';

        self::$valid_pattern = $reg_start . self::$part_pattern . $reg_end;
    }
1092070
public function name()
    {
        switch ($this->suit) {
            case static::CLUB:
                $suit = static::CLUB_LONG_NAME;
                break;
            case static::DIAMOND:
                $suit = static::DIAMOND_LONG_NAME;
                break;
            case static::HEART:
                $suit = static::HEART_LONG_NAME;
                break;
            default:
            case static::SPADE:
                $suit = static::SPADE_LONG_NAME;
                break;
        }

        return $suit;
    }
658011
protected function _getResourceName()
	{
		if( $this->_resourceName === null ) {
			$this->_resourceName = $this->_context->getConfig()->get( 'resource/default', 'db' );
		}

		return $this->_resourceName;
	}
105092
protected function getPattern()/*# : string */
    {
        if (is_null($this->reference_pattern)) {
            if ('' === $this->reference_start ||
                is_null($this->reference_end)) {
                $this->reference_pattern = '';
            } else {
                $this->reference_pattern = '~('  .
                    preg_quote($this->reference_start) .
                    '([a-zA-Z_][a-zA-Z0-9._]*+)' .
                    preg_quote($this->reference_end) . ')~';
            }
        }
        return $this->reference_pattern;
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
580309
private function createMigrationName()
    {
        $pieces = preg_split('/(?=[A-Z])/', $this->argument('model'), -1, PREG_SPLIT_NO_EMPTY);

        $string = '';
        foreach ($pieces as $i => $piece) {
            if ($i+1 < count($pieces)) {
                $string .= strtolower($piece) . '_';
            } else {
                $string .= Str::plural(strtolower($piece));
            }
        }

        return $string;
    }
1051238
public static function name()
    {
        return sprintf(
            self::pickOne(array(
                '%1$s %2$s %3$s',
                '%2$s %3$s %4$s',
                '%2$s %3$s',
                '%2$s %3$s',
                '%2$s %3$s',
                '%2$s %3$s',
            )),
            self::prefix(),
            self::firstName(),
            self::lastName(),
            self::suffix()
        );
    }
877579
static function createFromName($name, ClassIndexInterface $autoloadSource) {
    $reflectionClass = new \ReflectionClass($name);
    return self::createFromReflection($name, $reflectionClass, $autoloadSource);
  }
1030016
public function clarkNotation()
	{
		if ( $this->namespaceURI )
		{
			return sprintf( '{%s}%s', $this->namespaceURI, $this->localName );
		}
		else
		{
			return $this->localName;
		}
	}
1332094
public static function name($name, $valuePattern = null, $index = null)
    {
        $result = 'name='.$name;

        if (null !== $valuePattern) {
            $result .= ' value='.$valuePattern;
        }

        if (null !== $index) {
            $result .= ' index='.$index;
        }

        return $result;
    }
905742
public String getName() {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_path)) {
            return "";
        }
        String result = CmsResource.getName(m_path);
        // remove trailing slash as categories are not displayed like folders
        if (CmsResource.isFolder(result)) {
            result = result.substring(0, result.length() - 1);
        }
        return result;
    }
657735
final public function getName(): string
    {
        try {
            $reflexionConstant = new ReflectionClassConstant($this, 'NAME');
            $this->name        = $reflexionConstant->getValue();
        }
        catch (Exception $e) {
        }

        return $this->name;
    }