PHP Classes

File: src/SoftCreatR/WeakAuras/Iter.php

Recommend this page to a friend!
  Classes of Sascha Greuel   Weak Auras Decoder   src/SoftCreatR/WeakAuras/Iter.php   Download  
File: src/SoftCreatR/WeakAuras/Iter.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Weak Auras Decoder
Decode text strings of auras for World Of Warcraft
Author: By
Last change:
Date: 6 years ago
Size: 320 bytes
 

Contents

Class file image Download
<?php
namespace SoftCreatR\WeakAuras;

final class
Iter
{
    protected
$matches = [];

    public function
__construct($str)
    {
       
preg_match_all("~(?P<ctl>\^.)(?P<data>[^^]*)~i", $str, $this->matches, PREG_SET_ORDER);
    }

    public function
next()
    {
        return
array_shift($this->matches);
    }
}