Concatenate the object list

@param $objects
11535
public function concatenateObjectList()
    {
        //Short circuit if cache is disabled
        if (empty($this->cache) || empty($this->cacheKey) || empty($this->cacheTime)) {
            $this->source = 'raw';
            $this->output = $this->concatenateObjects();
            return;
        }

        //See if you can grab it from cache, unless cache refresh param is set
        if (!$this->cacheRefresh &&
            ($this->output = $this->cache->get($this->cacheKey)) !== null
        ) {
            $this->getActualLastModifiedTime();

            $lastCacheModifiedTime = $this->extractLastModifiedTime($this->output);

            if ($lastCacheModifiedTime == $this->lastModifiedTime) {
                //The cached timestamp is the same as what's in the cached copy so we can return it,
                //otherwise we can skip this and re-fetch since the source files are newer

                $this->source = 'cache';
                return;
            }
        }

        //Short circuit failed, get from cache failed, grab it and cache it
        $this->output = $this->concatenateObjects();

        $this->cache->set($this->cacheKey, $this->output, $this->cacheTime);

        $this->source = 'fetched';
    }
1030960
public function addObject($object)
    {
        $item = $this
            ->transformer
            ->toItem($object);

        if ($item instanceof Item) {
            $this->addItem($item);
        }
    }
1283759
public function persist($objects)
    {
        if (!is_array($objects) && !$objects instanceof \Traversable) {
            $objects = array($objects);
        }
        foreach ($objects as $object) {
            if (!is_object($object)) {
                throw new UnexpectedTypeException($object, 'object');
            }
            $this->unitOfWork->persist($object);
        }
    }
108449
function combine(...objects) {
  inv(Array.isArray(objects) && objects.length > 0,
    'You must pass at least one object to instantiate'
  );

  inv(objects.every(isObj),
    'Expecting only plain objects as parameter(s)'
  );

  return assign({}, ...objects);
}
398229
public function addAppends($appends)
	{
		if (is_string($appends)) {
			$appends = func_get_args();
		}

		$this->appends = array_merge($this->appends, $appends);

		return $this;
	}
958862
public function add($object)
    {
        $this->hasUnpersistedChanges = true;
        $this->addedObjects->attach($object);
        $this->removedObjects->detach($object);
    }
1357675
public function bucket_object_concatenate( $obj1, $obj2, $final_name ) {
	 
	 	$result = null;
	 	$sources = array(
	 		$obj1,
	 		$obj2
	 	);
	 	try {
	 	
	 		$this->object = $this->bucket->compose( $sources, $final_name );
	 		if( null != $this->object ) {
	 		
	 			$this->get_object_acl();
	 		
	 		}
	 		$result = $this->object;
	 	
	 	}
	 	catch( \Exception $e ) {
	
			$result = $e;
			$this->errors[$this->error_count] = $e->getServiceException()->getMessage();
			$this->error_count++;
		
		}
	 	return $result;
	 
	 }
1348214
protected function addValues($fields)
    {
        $values_array = [];
        foreach ($fields as $values) {
            $values_array[] = '(' . $this->_addValue($values) . ')';
        }

        return implode(',', $values_array);
    }
282130
public function add($object)
    {
        if ($this->removedNodes->contains($object)) {
            $this->removedNodes->detach($object);
        }
        if (!$this->addedNodes->contains($object)) {
            $this->addedNodes->attach($object);
        }
        parent::add($object);
    }
713444
public function persistAllObjects(PersistenceContext $context, array $objects) : array
    {
        $rows = [];

        foreach ($objects as $key => $object) {
            $rows[$key] = new Row($this->table);
        }

        $this->persistAll($context, $objects, $rows);

        return $rows;
    }
159217
public function mergeWith(self $objects): self
    {
        $clone = clone $this;
        foreach ($objects->objects as $reference => $object) {
            $clone->objects[$reference] = $object;
            $clone->array[$reference] = $object->getInstance();
        }
        
        return $clone;
    }
1238441
private function addFileObject($file)
    {
        $file = $this->getActualFilename($file);

        try
        {
            $this->concatenator->addObject($file, []);
        }
        catch (\Exception $e)
        {
            $this->system->log()->error("Failed to add concatenator object: " . $file);
        }
    }
1267242
public static function concat($paths)
    {
        $returnValue = (string) '';

        foreach ($paths as $path){
        	if (!preg_match("/\/$/", $returnValue) && !preg_match("/^\//", $path) && !empty($returnValue)){
        		$returnValue .= '/';
        	}
        	$returnValue .= $path;
        }
        $returnValue = str_replace('//', '/', $returnValue);

        return (string) $returnValue;
    }
403251
private function buildSubjects(array $objects)
    {
        $subjects = [];

        foreach ($objects as $object) {
            $subject = SubjectIdentity::fromObject($object);
            $id = SharingUtils::getCacheId($subject);

            if (!\array_key_exists($id, $this->cacheSubjectSharing)
                    && $this->hasIdentityPermissible()
                    && $this->hasSharingVisibility($subject)
                    && $this->hasSubjectConfig($subject->getType())) {
                $subjects[$id] = $subject;
                $this->cacheSubjectSharing[$id] = false;
            }
        }

        return $subjects;
    }
525486
public function applyTo($object)
	{
		foreach($this->toArray() as $key=>$value)
			$object->$key=$value;
	}
882132
public function add_objects( $type, array $objects, $parent = null ) {
		foreach ( $objects as $slug => $struct ) {
			if ( is_array( $struct ) ) {
				$this->add( $type, $slug, $struct, $parent );
			}
		}
	}
1368154
public function concat($paths)
    {
        if (is_array($paths))
            $paths = implode('/', $paths);
        return $this->fullPath() . '/' . $paths;
    }