Set HEAD

@param  array|Reference                      $reference
@return \Webcreate\Vcs\Common\AbstractClient
977489
public function setHead($reference)
    {
        if ($reference instanceof Reference) {
            $this->head = $reference;
        } elseif (is_array($reference)) {
            list ($name, $type) = $reference;
            $this->head = new Reference($name, $type);
        }

        return $this;
    }
634479
public function createReference($reference, Closure $callable, array $parameters = [], $shared = false)
    {
        $reference = $this->mapReference($reference);

        $this[$reference] =
            ($shared) ? static::share($callable) : static::protect($callable);

        return $this[$reference];
    }
518017
public function head($uri = null, $expectedStatus = null)
    {
        $this->setMethod('HEAD');
        $this->setUri($uri);
        if (!is_null($expectedStatus)) {
            $this->expectingStatusCode($expectedStatus);
        }

        return $this;
    }
1024140
public function setReference(ChildReference $v = null)
    {
        if ($v === null) {
            $this->setReferenceId(NULL);
        } else {
            $this->setReferenceId($v->getId());
        }

        $this->aReference = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildReference object, it will not be re-added.
        if ($v !== null) {
            $v->addVideo($this);
        }


        return $this;
    }
795584
public function setReferenceContext(ReferenceContext $context)
    {
        foreach ($this->_properties as $property => $value) {
            if ($value instanceof Reference) {
                $value->setContext($context);
            } elseif ($value instanceof SpecObjectInterface) {
                $value->setReferenceContext($context);
            } elseif (is_array($value)) {
                foreach ($value as $k => $item) {
                    if ($item instanceof Reference) {
                        $item->setContext($context);
                    } elseif ($item instanceof SpecObjectInterface) {
                        $item->setReferenceContext($context);
                    }
                }
            }
        }
    }
651395
public function setReferenceContext(ReferenceContext $context)
    {
        foreach ($this->_responses as $k => $response) {
            if ($response instanceof Reference) {
                $response->setContext($context);
            } else {
                $response->setReferenceContext($context);
            }
        }
    }
537001
public function addReference(ChildReference $reference)
    {
        if ($this->collReferences === null) {
            $this->initReferences();
        }

        if (!$this->getReferences()->contains($reference)) {
            // only add it if the **same** object is not already associated
            $this->collReferences->push($reference);
            $this->doAddReference($reference);
        }

        return $this;
    }
1276421
private function getCachedDataByReference(Reference $reference)
    {
        return $this->getCachedDataByClassNameAndId($reference->getClassName(), $this->stringify($reference->getId()));
    }
1284964
function set($key, $value = null)
    {
        if ($key !== $hash = $this->_normalizeKey($key)) {
            $propObj = $key;
            $key = $hash;
            ## store object map
            $this->__mapedPropObjects[$key] = $propObj;
        }


        $properties = &$this->_referDataArrayReference();
        $properties[$key] = $value;

        return $this;
    }
1077602
private function loadExternalRef($reference)
    {
        list($prefix, $path) = parse_external_ref($reference);
        return $this->loaderManager->getLoader($prefix)->load($path);
    }
1055115
protected function setReferenceSource()
    {
        if (null !== $this->info->reference->source) {
            return $this;
        }

        // No source is set, see if we can find a standard match
        $matchAttributes = config('cms-models.analyzer.reference.sources', []);
        
        foreach ($matchAttributes as $matchAttribute) {

            if (array_key_exists($matchAttribute, $this->info->attributes)) {
                $this->info->reference->source = $matchAttribute;
                break;
            }
        }

        return $this;
    }
790488
public function head()
    {
        $query = $this->getCriteria();

        $args = func_get_args();
        if(empty($args)){
            $args = null;
        }

        $response = '';

        try {
            $response = $this->client->request($this, 'head', $args, array(), $query);
        } catch(Exception $ex) {
            $this->dispatchException($ex);
        }

        return $this->transformResponse($response, true);
    }
560591
public function removeReference(ChildReference $reference)
    {
        if ($this->getReferences()->contains($reference)) { $skillReference = new ChildSkillReference();

            $skillReference->setReference($reference);
            if ($reference->isSkillsLoaded()) {
                //remove the back reference if available
                $reference->getSkills()->removeObject($this);
            }

            $skillReference->setSkill($this);
            $this->removeSkillReference(clone $skillReference);
            $skillReference->clear();

            $this->collReferences->remove($this->collReferences->search($reference));

            if (null === $this->referencesScheduledForDeletion) {
                $this->referencesScheduledForDeletion = clone $this->collReferences;
                $this->referencesScheduledForDeletion->clear();
            }

            $this->referencesScheduledForDeletion->push($reference);
        }


        return $this;
    }
764114
public function addReferenceCache($reference)
    {
        $cache = $this->getMandango()->getCache();

        foreach ($this->getQueryHashes() as $hash) {
            $value = $cache->has($hash) ? $cache->get($hash) : array();
            if (!isset($value['references']) || !in_array($reference, $value['references'])) {
                $value['references'][] = $reference;
                $cache->set($hash, $value);
            }
        }
    }
144809
public function setSubject($subject)
    {
        if (!$this->setHeaderFieldModel('Subject', $subject)) {
            $this->getHeaders()->addTextHeader('Subject', $subject);
        }

        return $this;
    }
1353289
public function setTransactionReference($reference)
    {
        if (strpos($reference, 'SecurityKey') !== false) {
            // A JSON string provided - the legacy transactionReference format.
            // Decode it then extact the securityKey.
            // We only need the security key here for the signature; all other
            // items from the reference will be in the server request.

            $parts = json_decode($reference, true);

            if (isset($parts['SecurityKey'])) {
                $this->setSecurityKey($parts['SecurityKey']);
            }
        }

        return $this;
    }
405386
public function prune($reference = null)
    {
        if ($reference) {
            $this->addUsingAlias(ReferenceTableMap::COL_ID, $reference->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }