Injects the properties of another bean but keeps the original ID.
Just like import() but keeps the original ID.
Chainable.

@param RedBean_OODBBean $otherBean the bean whose properties you would like to copy

@return RedBean_OODBBean $self
502869
public function inject(RedBean_OODBBean $otherBean) {
		$myID = $this->id;
		$array = $otherBean->export();
		$this->import($array);
		$this->id = $myID;
		return $this;
	}
339645
public function logicalAnd(self $other){
		
		$l = \max(array($this->count(), $other->count()));
		$new = new static();
		
		for($i = 0; $i < $l; ++$i){
			$new[$i] = isset($this[$i], $other[$i])
					? ($this[$i] && $other[$i])
					: false;
		}
		
		return $new;
		
	}
255736
public function equals($otherUrl, $opt = self::SCHEME | self::HOST | self::PORT | self::CREDENTIALS | self::PATH | self::QUERY | self::FRAGMENT)
	{
		if ($otherUrl instanceof Url) {
			$url = $otherUrl;
		} else if (is_string($otherUrl)) {
			$url = new Url($otherUrl);
		} else {
			throw new InvalidUrlException();
		}
		$scheme = ($opt & self::SCHEME) === self::SCHEME;
		$host = ($opt & self::HOST) === self::HOST;
		$port = ($opt & self::PORT) === self::PORT;
		$creds = ($opt & self::CREDENTIALS) === self::CREDENTIALS;
		$path = ($opt & self::PATH) === self::PATH;
		$query = ($opt & self::QUERY) === self::QUERY;
		$fragment = ($opt & self::FRAGMENT) === self::FRAGMENT;
		if ($scheme && ! $this->scheme->equals($url->scheme)) {
			return false;
		}
		if ($host && ! $this->host->equals($url->host)) {
			return false;
		}
		if ($port && ! $this->port->equals($url->port)) {
			return false;
		}
		if ($creds && ! $this->credentials->equals($url->credentials)) {
			return false;
		}
		if ($path && ! $this->path->equals($url->path)) {
			return false;
		}
		if ($query && ! $this->query->equals($url->query)) {
			return false;
		}
		if ($fragment && ! $this->fragment->equals($url->fragment)) {
			return false;
		}
		return true;
	}
509269
public function equals(WebDriverElement $other)
    {
        try {
            return $this->element->equals($other);
        } catch (WebDriverException $exception) {
            $this->dispatchOnException($exception);
            throw $exception;
        }
    }
253435
public function equals( $other ) {
		return $other instanceof self
			&& $this->username == $other->getUsername()
			&& $this->password == $other->getPassword()
			&& $this->domain == $other->getDomain();
	}
561001
public function withProperty(string $property, $value): self
    {
        return new self(
            $this->class,
            $this->properties->put($property, $value),
            $this->injectionStrategy,
            $this->instanciator
        );
    }
1289285
public function with(...$with): self
    {
        $this->hasWith = true;
        $this->with = $with;

        return $this;
    }
1268907
public function copyRelations($originalContentId, $copiedContentId, $versionNo = null)
    {
        // Given we can retain all columns, we just create copies with new `from_contentobject_id` using INSERT INTO SELECT
        $sql = 'INSERT INTO ezcontentobject_link ( contentclassattribute_id, from_contentobject_id, from_contentobject_version, relation_type, to_contentobject_id )
                SELECT  L2.contentclassattribute_id, :copied_id, L2.from_contentobject_version, L2.relation_type, L2.to_contentobject_id
                FROM    ezcontentobject_link AS L2
                WHERE   L2.from_contentobject_id = :original_id';

        if ($versionNo) {
            $stmt = $this->connection->prepare($sql . ' AND L2.from_contentobject_version = :version');
            $stmt->bindValue('version', $versionNo, PDO::PARAM_INT);
        } else {
            $stmt = $this->connection->prepare($sql);
        }

        $stmt->bindValue('original_id', $originalContentId, PDO::PARAM_INT);
        $stmt->bindValue('copied_id', $copiedContentId, PDO::PARAM_INT);

        $stmt->execute();
    }
1336427
public static function fromOther(FileViewFinder $otherFinder){

        $copy = new static($otherFinder->getFilesystem(),
                           $otherFinder->getPaths(),
                           $otherFinder->getExtensions());

        if($otherFinder instanceof FallbackFileViewFinder){
            $copy->setFallbackDir($otherFinder->getFallbackDir());
        }

        return $copy;

    }
1260310
public function equals(WebDriverElement $other)
    {
        return $this->executor->execute(DriverCommand::ELEMENT_EQUALS, [
            ':id' => $this->id,
            ':other' => $other->getID(),
        ]);
    }
806231
public final Node clonePropsFrom(Node other) {
    checkState(this.propListHead == null, "Node has existing properties.");
    this.propListHead = other.propListHead;
    return this;
  }
1098083
public function fieldGreaterThanOrEqualAnother(string $fieldName, string $otherFieldName)
    {
        $this->validateFieldsExist(__METHOD__, $fieldName, $otherFieldName);

        return $this->validate(new FieldGreaterThanOrEqualAnotherValidator($this->fields[$fieldName], $this->fields[$otherFieldName]));
    }
330522
public function merge(self $otherMetadata): self
    {
        return new self(array_merge($this->values, $otherMetadata->values));
    }
1063726
public function add($child, $other = null){
		if($other){
			throw new \Exception('Inserting before not supported');
		}else{
			$this->children[] = $child;
		}
		return $child;
	}
325415
public function duplicate($newAreaLayout)
    {
        $areaLayoutColumnID = parent::duplicate($newAreaLayout);
        $db = Loader::db();
        $v = array($areaLayoutColumnID, $this->arLayoutColumnSpan, $this->arLayoutColumnOffset);
        $db->Execute('insert into AreaLayoutThemeGridColumns (arLayoutColumnID, arLayoutColumnSpan, arLayoutColumnOffset) values (?, ?, ?)', $v);
        $newAreaLayoutColumn = self::getByID($areaLayoutColumnID);

        return $newAreaLayoutColumn;
    }
772970
public function append($other): self
    {
        if (is_array($this->elements) && !is_array($other) && !($other instanceof \Traversable)) {
            $all = $this->elements;
            $all[] = $other;
            return new self($all);
        }

        $appendIterator = new \AppendIterator();
        $appendIterator->append($this->getIterator());
        $appendIterator->append(castToIterator($other));
        return new self($appendIterator, $this->type);
    }
183328
protected function replaceRoot(&$id)
    {
        if (null !== $id && $id === self::ROOT_PLACEHOLDER) {
            $rootId = $this->getRootId($this->import);
            if ($rootId === null) {
                throw new LogicException('Import root is not defined.');
            }
            $id = $rootId;
        }

        return $this;
    }