public function push($value)
    {
        if (!$this->current->value) {
            $this->current->value = $value;
        } else {
            $temp = $this->current;
            $this->current = new ClassNode($value, $temp->prev);
            $this->current->next = $temp;
            $temp->prev = $this->current;
            if ($temp === $this->head) {
                $this->head = $this->current;
            } else {
                $this->current->prev->next = $this->current;
            }
        }
    }
public function push($value)
    {
        if (!$this->current->value) {
            $this->current->value = $value;
        } else {
            $temp = $this->current;
            $this->current = new ClassNode($value, $temp->prev);
            $this->current->next = $temp;
            $temp->prev = $this->current;
            if ($temp === $this->head) {
                $this->head = $this->current;
            } else {
                $this->current->prev->next = $this->current;
            }
        }
    }
public function push ( $ value ) { if ( ! $ this -> current -> value ) { $ this -> current -> value = $ value ; } else { $ temp = $ this -> current ; $ this -> current = new ClassNode ( $ value , $ temp -> prev ) ; $ this -> current -> next = $ temp ; $ temp -> prev = $ this -> current ; if ( $ temp === $ this -> head ) { $ this -> head = $ this -> current ; } else { $ this -> current -> prev -> next = $ this -> current ; } } }
Insert a value at the current position in the list.

Any currently set value at this position will be pushed back in the list
after the new value.

@param mixed $value

@return void
Insert a value at the current position in the list .