Skip to content

Commit

Permalink
prefix, suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
tyz910 committed Apr 1, 2015
1 parent 7ee3d1d commit c38b31a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -35,7 +35,8 @@ Also you can use any search-pattern spelling you wish:
<?php
use DocxTemplate\TemplateFactory;

$template = TemplateFactory::load('template.docx', '${%s}'); // %s will be replaced with mark name
TemplateFactory::useMarkSyntax('${', '}'); // prefix and suffix
$template = TemplateFactory::load('template.docx');
```

## Installation using [Composer](http://getcomposer.org/)
Expand Down
8 changes: 4 additions & 4 deletions src/DocxTemplate/TemplateFactory.php
Expand Up @@ -12,14 +12,14 @@ class TemplateFactory
private static $defaultMatcher;

/**
* @param string $open
* @param string $close
* @param string $prefix
* @param string $suffix
* @param bool $strictMatch
* @param string $markNameRegExp
*/
public static function useMarkSyntax($open, $close, $strictMatch = false, $markNameRegExp = null)
public static function useMarkSyntax($prefix, $suffix, $strictMatch = false, $markNameRegExp = null)
{
self::$defaultMatcher = new RegExpMatcher($open, $close, $strictMatch, $markNameRegExp);
self::$defaultMatcher = new RegExpMatcher($prefix, $suffix, $strictMatch, $markNameRegExp);
}

/**
Expand Down

0 comments on commit c38b31a

Please sign in to comment.