__construct() public method

Constructor.
public __construct ( string $regex, integer $itemNumber )
$regex string Regular Expression to use.
$itemNumber integer Item number to pick in regex.
Esempio n. 1
0
 /**
  * Constructor.
  *
  * @param array $siteAccessesConfiguration SiteAccesses configuration.
  */
 public function __construct(array $siteAccessesConfiguration)
 {
     $this->prefix = isset($siteAccessesConfiguration['prefix']) ? $siteAccessesConfiguration['prefix'] : '';
     $this->suffix = isset($siteAccessesConfiguration['suffix']) ? $siteAccessesConfiguration['suffix'] : '';
     parent::__construct('^(/' . preg_quote($this->prefix, '@') . '(\\w+)' . preg_quote($this->suffix, '@') . ')', 2);
 }
Esempio n. 2
0
 /**
  * Constructor.
  *
  * @param array $siteAccessesConfiguration SiteAccesses configuration.
  */
 public function __construct(array $siteAccessesConfiguration)
 {
     parent::__construct(isset($siteAccessesConfiguration['regex']) ? $siteAccessesConfiguration['regex'] : '', isset($siteAccessesConfiguration['itemNumber']) ? (int) $siteAccessesConfiguration['itemNumber'] : 1);
 }
Esempio n. 3
0
 /**
  * Constructor.
  *
  * @param array $siteAccessesConfiguration SiteAccesses configuration.
  */
 public function __construct(array $siteAccessesConfiguration)
 {
     parent::__construct(isset($siteAccessesConfiguration["regex"]) ? $siteAccessesConfiguration["regex"] : "", isset($siteAccessesConfiguration["itemNumber"]) ? (int) $siteAccessesConfiguration["itemNumber"] : 1);
 }
Esempio n. 4
0
 /**
  * Constructor.
  *
  * @param array $siteAccessesConfiguration SiteAccesses configuration.
  */
 public function __construct(array $siteAccessesConfiguration)
 {
     $this->prefix = isset($siteAccessesConfiguration['prefix']) ? $siteAccessesConfiguration['prefix'] : '';
     $this->suffix = isset($siteAccessesConfiguration['suffix']) ? $siteAccessesConfiguration['suffix'] : '';
     parent::__construct("^" . preg_quote($this->prefix, "@") . "(\\w+)" . preg_quote($this->suffix, "@") . '$', 1);
 }