src/PAGI/CallSpool/CallFile.php
public function unserialize($text)
    {
        $lines = explode("\n", $text);
        foreach ($lines as $line) {
            $data = explode(':', $line);
            if (count($data) < 2) {
                continue;
            }
            $key = trim($data[0]);
            if (isset($data[1]) && (strlen($data[1]) > 0)) {
                $value = trim($data[1]);
            } else {
                $value = '?';
            }
            if (strcasecmp($key, 'set') === 0) {
                $data = explode('=', $value);
                $key = trim($data[0]);
                if (isset($data[1]) && (strlen($data[1]) > 0)) {
                    $value = trim($data[1]);
                } else {
                    $value = '?';
                }
                $this->setVariable($key, $value);
            } else {
                $this->setParameter($key, $value);
            }
        }
    }
public function unserialize($text)
    {
        $lines = explode("\n", $text);
        foreach ($lines as $line) {
            $data = explode(':', $line);
            if (count($data) < 2) {
                continue;
            }
            $key = trim($data[0]);
            if (isset($data[1]) && (strlen($data[1]) > 0)) {
                $value = trim($data[1]);
            } else {
                $value = '?';
            }
            if (strcasecmp($key, 'set') === 0) {
                $data = explode('=', $value);
                $key = trim($data[0]);
                if (isset($data[1]) && (strlen($data[1]) > 0)) {
                    $value = trim($data[1]);
                } else {
                    $value = '?';
                }
                $this->setVariable($key, $value);
            } else {
                $this->setParameter($key, $value);
            }
        }
    }
public function unserialize ( $ text ) { $ lines = explode ( "\n" , $ text ) ; foreach ( $ lines as $ line ) { $ data = explode ( ':' , $ line ) ; if ( count ( $ data ) < 2 ) { continue ; } $ key = trim ( $ data [ 0 ] ) ; if ( isset ( $ data [ 1 ] ) && ( strlen ( $ data [ 1 ] ) > 0 ) ) { $ value = trim ( $ data [ 1 ] ) ; } else { $ value = '?' ; } if ( strcasecmp ( $ key , 'set' ) === 0 ) { $ data = explode ( '=' , $ value ) ; $ key = trim ( $ data [ 0 ] ) ; if ( isset ( $ data [ 1 ] ) && ( strlen ( $ data [ 1 ] ) > 0 ) ) { $ value = trim ( $ data [ 1 ] ) ; } else { $ value = '?' ; } $ this -> setVariable ( $ key , $ value ) ; } else { $ this -> setParameter ( $ key , $ value ) ; } } }
Deconstructs a call file from the given text.

@param string $text A call file (intended to be pre-loaded, with
file_get_contents() or similar).

@return void
Deconstructs a call file from the given text .