public function insertAfter($value, $afterKey)
    {
        $new_object = new self();

        foreach ((array)$this->items as $k => $v) {
            if ($afterKey == $k) {
                $new_object->add($value);
            }

            $new_object->add($v);
        }

        $this->items = $new_object->items;

        return $this;
    }
public function insertAfter($value, $afterKey)
    {
        $new_object = new self();

        foreach ((array)$this->items as $k => $v) {
            if ($afterKey == $k) {
                $new_object->add($value);
            }

            $new_object->add($v);
        }

        $this->items = $new_object->items;

        return $this;
    }
public function insertAfter ( $ value , $ afterKey ) { $ new_object = new self ( ) ; foreach ( ( array ) $ this -> items as $ k => $ v ) { if ( $ afterKey == $ k ) { $ new_object -> add ( $ value ) ; } $ new_object -> add ( $ v ) ; } $ this -> items = $ new_object -> items ; return $ this ; }
Insert into an object

Should be able to do this with methods
that already exist on collection.

@param mixed $value
@param int   $afterKey

@return Collection
Insert into an object