Unloads an asset

@param  mixed  $mAssets        The asset to unload, can be an array or a string
@param  string $sAssetLocation The asset's location
@param  string $sForceType     The asset's file type (e.g., JS or CSS)

@return object
348657
public function unload($mAssets, $sAssetLocation = 'APP', $sForceType = null)
    {
        //  Cast as an array
        $aAssets = (array) $mAssets;

        // --------------------------------------------------------------------------

        //  Backwards compatibility
        $sAssetLocation = $sAssetLocation === true ? 'NAILS' : $sAssetLocation;

        // --------------------------------------------------------------------------

        switch (strtoupper($sAssetLocation)) {

            case 'NAILS-BOWER':

                $sAssetLocationMethod = 'unloadNailsBower';
                break;

            case 'NAILS-PACKAGE':

                $sAssetLocationMethod = 'unloadNailsPackage';
                break;

            case 'NAILS':

                $sAssetLocationMethod = 'unloadNails';
                break;

            case 'APP-BOWER':
            case 'BOWER':

                $sAssetLocationMethod = 'unloadAppBower';
                break;

            case 'APP-PACKAGE':
            case 'PACKAGE':

                $sAssetLocationMethod = 'unloadAppPackage';
                break;

            case 'APP':

                $sAssetLocationMethod = 'unloadApp';
                break;

            default:

                $sAssetLocationMethod = 'unloadModule';
                break;
        }

        // --------------------------------------------------------------------------

        foreach ($aAssets as $sAsset) {

            if (preg_match('#^https?://#', $sAsset)) {

                $this->unloadUrl($sAsset, $sForceType);

            } elseif (substr($sAsset, 0, 0) == '/') {

                $this->unloadAbsolute($sAsset, $sForceType);

            } else {

                $this->{$sAssetLocationMethod}($sAsset, $sForceType, $sAssetLocation);
            }
        }

        // --------------------------------------------------------------------------

        return $this;
    }
921597
public function unbindHandler($exceptionTypes)
    {
        if (! is_array($exceptionTypes)) {
            $exceptionTypes = [$exceptionTypes];
        }

        foreach ($exceptionTypes as $exceptionType) {
            // TODO : remplacer par un array_key_exist
            if (isset($this->handlers[$exceptionType])) {
                unset($this->handlers[$exceptionType]);
            }
        }
    }
471930
public static function assetFileTypeExists($sAssetFileType)
    {
        if (!is_string($sAssetFileType)) {
            throw new \InvalidArgumentException('Asset file type expects string, "' . gettype($sAssetFileType) . '" given');
        }
        switch ($sAssetFileType) {
            case self::ASSET_CSS:
            case self::ASSET_LESS:
            case self::ASSET_JS:
            case self::ASSET_MEDIA:
                return true;
            default:
                return false;
        }
    }
719331
public function jsonLDSerialize(string $context = self::DEFAULT_CONTEXT, bool $types = null)
    {
        if (!$this->memberSet && !$this->memberList && !$this->memberChoice) {
            $this->memberSet = new Set();
        }

        return parent::jsonLDSerialize($context, $types);
    }
1338161
public function unwrapAndDeserialize($serializedEnvelope)
    {
        $envelope = $this->deserializeEnvelope($serializedEnvelope);

        $message = $this->deserializeMessage($envelope->serializedMessage(), $envelope->messageType());

        return $envelope->withMessage($message);
    }
447936
public function exchangeDelete($exchange, $ifUnused = false, $nowait = false)
    {
        return $this->getClient()->exchangeDelete($this->getChannelId(), $exchange, $ifUnused, $nowait);
    }
393495
protected function unloadNailsPackage($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                unset($this->aCss['NAILS-PACKAGE-' . $sAsset]);
                break;

            case 'JS':

                unset($this->aJs['NAILS-PACKAGE-' . $sAsset]);
                break;
        }
    }
125750
public function deleteResource(
        ResourceSet $sourceResourceSet,
        $sourceEntityInstance
    ) {
        $source = $this->unpackSourceEntity($sourceEntityInstance);

        $verb = 'delete';
        if (!($source instanceof Model)) {
            throw new InvalidArgumentException('Source entity must be an Eloquent model.');
        }

        $class = $sourceResourceSet->getResourceType()->getInstanceType()->getName();
        $id = $source->getKey();
        $name = $source->getKeyName();
        $data = [$name => $id];

        $data = $this->createUpdateDeleteCore($source, $data, $class, $verb);

        $success = isset($data['id']);
        if ($success) {
            return true;
        }
        throw new ODataException('Target model not successfully deleted', 422);
    }
585444
public static function unstaged()
	{
		$available = static::available();
		
		foreach( $available as $key => $migrations )
		{
			foreach( $migrations as $time => $migration )
			{
				if ( $time <= static::$config->get( $key.'.revision', 0 ) )
				{
					unset( $available[$key][$time] );
				}
			}
		}
		
		return $available;
	}
1182625
public function removeCustomType($type)
    {
        if (!$this->hasCustomType($type)) {
            throw PlatformException::customTypeDoesNotExist($type);
        }

        unset($this->customTypes[array_search($type, $this->customTypes)]);
    }
403756
public function createNewResourceIconSet(IconSet $iconSet, $iconNamesForType)
    {
        // Persist new Set
        $this->om->persist($iconSet);
        $this->om->flush();
        // Create icon set's folder
        $this->createIconSetDirForCname($iconSet->getCname());
        $this->extractResourceIconSetZipAndReturnNewIconItems($iconSet, $iconNamesForType);
        $this->om->flush();

        return $iconSet;
    }
502101
public function moveCell($fromAddress, $toAddress)
    {
        if ($fromAddress === $this->currentObjectID) {
            $this->currentObjectID = $toAddress;
        }

        $this->deleteQuery->bindValue('id', $toAddress, SQLITE3_TEXT);
        $result = $this->deleteQuery->execute();
        if ($result === false) {
            throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg());
        }

        $this->updateQuery->bindValue('toid', $toAddress, SQLITE3_TEXT);
        $this->updateQuery->bindValue('fromid', $fromAddress, SQLITE3_TEXT);
        $result = $this->updateQuery->execute();
        if ($result === false) {
            throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg());
        }

        return true;
    }
813154
public function moveCell($fromAddress, $toAddress) {
		if ($fromAddress === $this->_currentObjectID) {
			$this->_currentObjectID = $toAddress;
		}
		$this->_currentCellIsDirty = true;
		if (isset($this->_cellCache[$fromAddress])) {
			$this->_cellCache[$toAddress] = &$this->_cellCache[$fromAddress];
			unset($this->_cellCache[$fromAddress]);
		}

		return TRUE;
	}
1373104
public function convertDataObjectSet(SS_List $set, $fields = null)
    {
        $items = array();
        foreach ($set as $do) {
            if (!$do->canView()) {
                continue;
            }
            $items[] = $this->convertDataObjectToJSONObject($do, $fields);
        }

        $serobj = ArrayData::array_to_object(array(
            "totalSize" => (is_numeric($this->totalSize)) ? $this->totalSize : null,
            "items" => $items
        ));

        return Convert::array2json($serobj);
    }
753518
public function remove()
    {

        $origin = $destination = \Devil::getPathOf($this->config['dest']);
        if (isset($this->config['onload'])) {
            $destination .= '/origin';
        }
        $realFileName = $destination . '/' . $this->_primaryKey . '_' . $this->existing;
        if (file_exists($realFileName)) unlink($realFileName);

        if (isset($this->config['onload'])) foreach ($this->config['onload'] as $method=>$config) {
            $methodRemove = $method . 'Remove';
            $this->$methodRemove($origin, $this->_primaryKey . '_' . $this->existing, $config);
        }
    }
44126
protected function unloadAppPackage($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                unset($this->aCss['APP-PACKAGE-' . $sAsset]);
                break;

            case 'JS':

                unset($this->aJs['APP-PACKAGE-' . $sAsset]);
                break;
        }
    }
1188278
public function asset($encPath, $contentType, Filesystem $fileSystem)
    {
        try {
            $path = CryptoServiceFacade::url_decode($encPath);

            if (Request::get('isModule') === 'true') {
                $filePath = $path;
            } else {
                if (str_contains($path, 'dist/') || str_contains($path, 'themes/')) {
                    $filePath = __DIR__.'/../Assets/'.$path;
                } else {
                    $filePath = __DIR__.'/../Assets/src/'.$path;
                }
            }

            $fileName = basename($filePath);

            if (!is_null($contentType)) {
                $contentType = CryptoServiceFacade::url_decode($contentType);
            } else {
                $contentType = $fileSystem->mimeType($fileName);
            }

            $headers = ['Content-Type' => $contentType];

            return response()->download($filePath, $fileName, $headers);
        } catch (Exception $e) {
            return Response::make('file not found');
        }
    }