Append new data

@param string $index Unique identifier
@param null $data
@param bool $toAdmin If show on admin environment
@return $this
504036
public function add($index, $data = null, $toAdmin = false)
	{
		if (!$this->has($index))
		{
			$this->data = Arr::add($this->data, $index, $data);

			$this->metas = Arr::add($this->metas, $this->firstIndex($index), ['admin' => $toAdmin]);
		}

		return $this;
	}
265106
public function addItems( array $items, $index = null ) {
		foreach ( $items as $item ) {
			// Check if item exists then remove it first, effectively "moving" it
			$currentIndex = array_search( $item, $this->items, true );
			if ( $currentIndex !== false ) {
				$this->removeItems( [ $item ] );
				// Adjust index to compensate for removal
				if ( $currentIndex < $index ) {
					$index--;
				}
			}
			// Add the item
			$item->setElementGroup( $this );
		}

		if ( $index === null || $index < 0 || $index >= count( $this->items ) ) {
			$this->items = array_merge( $this->items, $items );
		} else {
			array_splice( $this->items, $index, 0, $items );
		}

		// Update actual target element contents to reflect our list
		$this->group->clearContent();
		$this->group->appendContent( $this->items );

		return $this;
	}
64792
public function insert( $index, $element ) {
		$this->validate_index( $index );
		$this->type->validate_element( $element );

		$a = array_slice( $this->elements, 0, $index );
		$b = array_slice( $this->elements, $index, count( $this->elements ) );

		$a[] = $element;

		return $this->new_from_trusted( array_merge( $a, $b ) );
	}
1090848
public function create($index)
    {
        $realname = $this->storage->getIndexRealname($index);

        $search = (new Search($this->client))->setIndex($realname);

        if ($this->dispatcher) {
            $this->dispatcher->dispatch('ucms_search.search_create', new GenericEvent($search));
        }

        return $search;
    }
906571
public function insert($index, $string)
    {
        // NOTE: This could be slightly confusing as the parameters
        // are back to front. I guess I could change the Str version...

        $this->str = $this->str->insert((string)$string, $index);

        return $this;
    }
639002
def append(self, data):
        """"""
        index = self.n_blocks # note off by one so use as index
        self[index] = data
        self.refs.append(data)
75926
public function addColumn($name, $format = null, $index = false)
    {
        $data = new \stdClass();
        $data->format = $format;
        $data->name = $name;
        if (!$index) {
            $this->columns[] = $data;
        } else {
            $this->columns[$index] = $data;
        }
    }
1116134
function _append($data)
	{
		if (strlen($data) - 4 > $this->_limit) {
			$data = $this->_addContinue($data);
		}
		$this->_data		.= $data;
		$this->_datasize	+= strlen($data);
	}
1243457
public function addRow($data = null)
    {
        $this->rowIndex++;
        if (is_array($data)) {
            foreach ($data as $column => $content) {
                $this->rows[ $this->rowIndex ][ $column ] = $content;
            }
        }

        return $this;
    }
308836
public function extractData($input, $index)
    {
        if (isset($input[$index])) {
            $this->setData($index, $input[$index]);
        }

        return $this;
    }
167334
public static function append(string $file = '', string $data = ''): bool
    {
        return static::write($file, $data, true);
    }
302838
public function append($data, $whence = null, $whence_index = null)
    {
        $this->data = $this->appendSegment(
            $this->data,
            $this->validate($data),
            $whence,
            $whence_index
        );
    }
841966
public function addRow($data, $rowId = null)
    {
        if (($rowId === null) && isset($data['id'])) {
            $rowId = $data['id'];
        }

        if ($rowId === null) {
            $rowId = count($this->rows);
        }

        $this->rows[$rowId] = $data;

        return $this;
    }
1130532
public function pop($index = null)
    {
        return null === $index ? array_pop($this->data) : current(array_splice($this->data, $index, 1));
    }
1048685
public function add($element, $index = null) {
		if ($index === null) {
			$this->collection[$this->size()] = $element;
		} else {
			array_splice($this->collection, $index, 0, $element);
		}
		
		return $this;
	}
146879
protected function merge($data, $index, $merge)
    {
        if (array_values($data) === $data) {
            return array_merge(
                array_merge(array_slice($data, 0, $index, true), $merge),
                $this->filter(array_slice($data, $index + 1, null, true))
            );
        }

        return array_slice($data, 0, $index, true) +
            $merge +
            $this->filter(array_slice($data, $index + 1, null, true));
    }
1286825
protected function mergeData($data, $index, $merge, $numericKeys)
    {
        if ($numericKeys) {
            return $this->removeMissingValues(array_merge(
                array_merge(array_slice($data, 0, $index, true), $merge),
                $this->filter(array_values(array_slice($data, $index + 1, null, true)))
            ));
        }

        return $this->removeMissingValues(array_slice($data, 0, $index, true) +
                $merge +
                $this->filter(array_slice($data, $index + 1, null, true)));
    }