mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
N°3169 - Add feature to connect Gsuite mail box with OAuth
N°2504 - Add feature to connect Office mail box with OAuth2 for Microsoft Graph N°5102 - Allow to send emails (eg. notifications) using GSuite SMTP and OAuth * 2.7 migration (wip)
This commit is contained in:
54
lib/laminas/laminas-stdlib/src/SplQueue.php
Normal file
54
lib/laminas/laminas-stdlib/src/SplQueue.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see https://github.com/laminas/laminas-stdlib for the canonical source repository
|
||||
* @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md
|
||||
* @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
|
||||
namespace Laminas\Stdlib;
|
||||
|
||||
use Serializable;
|
||||
|
||||
/**
|
||||
* Serializable version of SplQueue
|
||||
*/
|
||||
class SplQueue extends \SplQueue implements Serializable
|
||||
{
|
||||
/**
|
||||
* Return an array representing the queue
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray()
|
||||
{
|
||||
$array = [];
|
||||
foreach ($this as $item) {
|
||||
$array[] = $item;
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
return serialize($this->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Unserialize
|
||||
*
|
||||
* @param string $data
|
||||
* @return void
|
||||
*/
|
||||
public function unserialize($data)
|
||||
{
|
||||
foreach (unserialize($data) as $item) {
|
||||
$this->push($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user