function MemoryQueue::createItem

Overrides DrupalQueueInterface::createItem

File

modules/system/system.queue.inc, line 322

Class

MemoryQueue
Static queue implementation.

Code

public function createItem($data) {
    $item = new stdClass();
    $item->item_id = $this->id_sequence++;
    $item->data = $data;
    $item->created = time();
    $item->expire = 0;
    $this->queue[$item->item_id] = $item;
    return TRUE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.