append a LinkObject to a key with a LinksArray

@param string     $key
@param LinkObject $linkObject
487111
public function appendLinkObject($key, LinkObject $linkObject) {
		$this->ensureLinksObject();
		$this->links->appendLinkObject($key, $linkObject);
	}
1282207
static function updateUrlObjectLinks( $contentObjectAttribute, $urlIDArray )
    {
        $objectAttributeID = $contentObjectAttribute->attribute( 'id' );
        $objectAttributeVersion = $contentObjectAttribute->attribute('version');

        // Ensure links that have been removed from the attribute version are removed from the object link table
        $linkObjectLinkList = eZURLObjectLink::fetchLinkObjectList( $objectAttributeID, $objectAttributeVersion );
        foreach ( $linkObjectLinkList as $linkObjectLink ) {
            if ( !in_array( $linkObjectLink->attribute( 'url_id' ), $urlIDArray ) ) {
                $linkObjectLink->remove();
            }
        }

        // Ensure links that have been added to the attribute version are added to the object link table
        foreach( $urlIDArray as $urlID )
        {
            $linkObjectLink = eZURLObjectLink::fetch( $urlID, $objectAttributeID, $objectAttributeVersion );
            if ( $linkObjectLink == null )
            {
                $linkObjectLink = eZURLObjectLink::create( $urlID, $objectAttributeID, $objectAttributeVersion );
                $linkObjectLink->store();
            }
        }
    }
1126827
def put(self, key, value):
    ''''''
    # if value is a link, don't follow links
    if self._link_for_value(value):
      super(SymlinkDatastore, self).put(key, value)
      return

    # if `key` points to a symlink, need to follow it.
    current_value = super(SymlinkDatastore, self).get(key)
    link_key = self._link_for_value(current_value)
    if link_key:
      self.put(link_key, value) # self.put: could be another link.
    else:
      super(SymlinkDatastore, self).put(key, value)
941850
public function appendData($key, $data)
    {
        $this->_putData($key, $data);

        if ($this->_objectCreation) {
            return $this->_afterAppendDataToNewObject();
        }
        return $this;
    }
958708
public function addLink($linkSrc, $linkName = null, $styleFont = null, $styleParagraph = null) {
		$link = new PHPWord_Section_Link($linkSrc, $linkName, $styleFont, $styleParagraph);
		$rID = PHPWord_Media::addSectionLinkElement($linkSrc);
		$link->setRelationId($rID);
		
		$this->_elementCollection[] = $link;
		return $link;
	}
146460
private function mapFill(array $linkResult, string $field, array $row, $key): bool
    {
        // 如果没有对应的关联,则不扩展
        if (array_key_exists($row[$field], $linkResult)) {
            // 关联的记录
            $linkRow = $linkResult[$row[$field]];

            // 处理每一个关联的字段
            foreach ($linkRow as $k => $v) {
                // 如果本表已经有此字段,则不扩展
                if (!array_key_exists($k, $row)) {
                    $row[$k] = $v;
                }
            }
            $this->data[$key] = $row;
            return true;
        }
        return false;
    }
1210714
protected function addLink(Request $request, Link $link)
    {
        if (!class_exists(AddLinkHeaderListener::class)) {
            throw new \LogicException('You can not use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".');
        }

        if (null === $linkProvider = $request->attributes->get('_links')) {
            $request->attributes->set('_links', new GenericLinkProvider([$link]));

            return;
        }

        $request->attributes->set('_links', $linkProvider->withLink($link));
    }
556993
public function addLink($linkIdent, $link)
    {
        if (!is_string($linkIdent) && !is_numeric($linkIdent)) {
            throw new InvalidArgumentException(
                'Link identifier must be a string or '
            );
        }

        if (is_array($link)) {
            $active = true;
            $name   = null;
            $url    = null;
            $permissions = [];

            if (isset($link['ident'])) {
                $linkIdent = $link['ident'];
            } else {
                $link['ident'] = $linkIdent;
            }

            if (isset($link['active'])) {
                $active = !!$link['active'];
            }

            if (isset($link['name'])) {
                $name = $this->translator()->translation($link['name']);
            }

            if (isset($link['url'])) {
                $url = $this->translator()->translation($link['url']);
            }

            if (isset($link['required_acl_permissions'])) {
                $permissions = $link['required_acl_permissions'];
            }

            if ($name === null && $url === null) {
                return $this;
            }

            $this->links[$linkIdent] = [
                'active'   => $active,
                'name'     => $name,
                'url'      => $url,
                'selected' => $this->isCurrentItem([ $linkIdent, (string)$url ]),
                'required_acl_permissions' => $permissions
            ];
        } else {
            throw new InvalidArgumentException(sprintf(
                'Link must be an associative array, received %s',
                (is_object($link) ? get_class($link) : gettype($link))
            ));
        }

        return $this;
    }
1228394
private function setHeaderLink(array $linkEntries)
    {
        $values = [];
        foreach ($linkEntries as $linkEntry) {
            \PHPUnit\Framework\Assert::assertArrayHasKey(
                'uri',
                $linkEntry,
                'linkEntry should contain property "uri"'
            );
            \PHPUnit\Framework\Assert::assertArrayHasKey(
                'link-param',
                $linkEntry,
                'linkEntry should contain property "link-param"'
            );
            $values[] = $linkEntry['uri'] . '; ' . $linkEntry['link-param'];
        }

        $this->haveHttpHeader('Link', implode(', ', $values));
    }
963689
protected function create_relatedObject($key, $relation_type)
    {
        $c = $this->addChild($this->working_node, 'relatedObject');
        $this->addChild($c, 'key', $key);
        $c = $this->addChild($c, 'relation');
        // Mimick ANDS with enpty value to get both tags for relation. Only for better display
        // $c = $this->addChild($c, 'relation','     ');
        $c->setAttribute('type', $relation_type);
    }
232695
private void addLinkValue(String targetObjID) {
        int targetShardNo = getTargetObjectShardNumber(targetObjID);
        if (targetShardNo > 0 && m_linkDef.isSharded()) {
            m_dbTran.addShardedLinkValue(m_dbObj.getObjectID(), m_linkDef, targetObjID, targetShardNo);
        } else {
            m_dbTran.addLinkValue(m_dbObj.getObjectID(), m_linkDef, targetObjID);
        }
        addInverseLinkValue(targetObjID);
    }
1018343
public function addItemAfter(mixed $object, string $previous_key, ?string $key = null) : void
    {
        // If the previous key doesn't exist, just add the item to the end.
        if (!isset($this->members[$previous_key])) {
            $this->addItem($object, $key);
            return;
        }
        $position = array_search($previous_key, array_keys($this->members));
        $this->array_insert($object, $key, $position + 1);
    }
1259171
protected function handleLinks(array $data, Relationship $relationship)
    {
        if (! isset($data['links'])) {
            return;
        }

        foreach ($data['links'] as $linkName => $linkData)
        {
            $link = $this->createLink($linkName, $linkData);

            $relationship->addLink($link);
        }
    }
1269936
def link(self, source_key, target_key):
    ''''''
    link_value = self._link_value_for_key(source_key)

    # put straight into the child, to avoid following previous links.
    self.child_datastore.put(target_key, link_value)

    # exercise the link. ensure there are no cycles.
    self.get(target_key)
580579
public function setLink(string $host, Link $link): void
    {
        $this->links[$host] = $link;
    }
1267776
def link(self, key1, key2):
        
        # TODO make this have more than one key linked
        # TODO Maybe make the value a set?
        self._linked_keys[key1] = key2
        self._linked_keys[key2] = key1
45141
public function appendLink($key, $href, array $meta=[]) {
		$this->ensureLinksObject();
		$this->links->append($key, $href, $meta);
	}