public function getRequiredParams(): array
	{
		$regex = '/\[[^\[]+?\]/';
		$path = $this->getPath();

		while (preg_match($regex, $path)) {
			$path = preg_replace($regex, '', $path);
		}

		$required = [];

		preg_replace_callback('/<(\w+)>/', function ($item) use (&$required) {
			$required[] = end($item);
		}, $path);

		return $required;
	}
public function getRequiredParams(): array
	{
		$regex = '/\[[^\[]+?\]/';
		$path = $this->getPath();

		while (preg_match($regex, $path)) {
			$path = preg_replace($regex, '', $path);
		}

		$required = [];

		preg_replace_callback('/<(\w+)>/', function ($item) use (&$required) {
			$required[] = end($item);
		}, $path);

		return $required;
	}
public function getRequiredParams ( ) : array { $ regex = '/\[[^\[]+?\]/' ; $ path = $ this -> getPath ( ) ; while ( preg_match ( $ regex , $ path ) ) { $ path = preg_replace ( $ regex , '' , $ path ) ; } $ required = [ ] ; preg_replace_callback ( '/<(\w+)>/' , function ( $ item ) use ( & $ required ) { $ required [ ] = end ( $ item ) ; } , $ path ) ; return $ required ; }
Get required parameters from url mask
Get required parameters from url mask