Process and return the contents for this container for the
requested file type.

@param string $type 'style' or 'script'

@return string
6374
public function content($type)
	{
		$assets = array();
		
		foreach ($this->assets as $asset) {
			if ('style' == $type && 'css' !== $asset['ext'] && 'less' !== $asset['ext']) {
				continue;
			}
			else if ('script' == $type && 'js' !== $asset['ext']) {
				continue;
			}
			
			$assets[] = $this->process($asset);
		}
		
		if (empty($assets)) {
			return '';
		}
		
		if (count($assets) > 1 || $this->minify) {
			$assets = $this->combine($assets, $type);
		}
		
		$content = array();
		
		foreach ($assets as $asset) {
			$content[] = File::get(array_get($asset, 'path'));
		}
		
		return implode("\n\n", $content);
	}
836791
public function get($type): string
    {
        if (!in_array($type, self::$type, true)) {
            throw new \InvalidArgumentException('Invalid type parameter');
        }

        $content = (string)$this->client
            ->get(UserApi::generateUrl("csv/{$type}.csv"))
            ->getBody();

        return $content;
    }
1174635
public static function dumpType(string $type): string
    {
        if (self::isLikeName($type)) {
            return "<$type>";
        }
        return self::dumpInline($type);
    }
90997
public function getStorages($type = null)
    {
        if ($type === null) {
            return $this->get('/storage');
        }

        $supportedTypes = array(
            'lvm',
            'nfs',
            'dir',
            'zfs',
            'rbd',
            'iscsi',
            'sheepdog',
            'glusterfs',
            'iscsidirect',
        );

        if (in_array($type, $supportedTypes)) {
            return $this->get('/storage', array(
                'type' => $type,
            ));
        }

        /* If type not found returns null */
        return null;
    }
514682
public function getPackageDownloads($type)
    {
        $statsType = 'get' . ucfirst($type);
        if (($download = $this->getDownloads()) && $download instanceof \Packagist\Api\Result\Package\Downloads) {
            return $download->{$statsType}();
        }
    }
1308896
public function getFlashText($type)
    {
        if ($this->{$type}) {
            return $this->{$type};
        } elseif ($this->parent) {
            return $this->parent->getFlashText($type);
        }

        return $type;
    }
594725
public function open($type = 'image/jpeg')
    {
        switch ($type) {
            case 'image/jpeg':
                $image = imagecreatefromjpeg($this->file);
                break;
            case 'image/gif':
                $image = imagecreatefromgif($this->file);
                break;
            case 'image/png':
                $image = imagecreatefrompng($this->file);
                break;
            default:
                $image = null;
        }
        return $this->image = $image;
    }
555996
protected function getContentOfType($path, $type)
    {
        $content = $this->getContent($path);
        if (null !== $content && $content->getType() === $type) {
            return $content;
        }

        return null;
    }
1306114
public static function fetchType($type): string
    {
        if(\is_int($type)) {
            switch($type) {
                case self::TYPE_UNKNOWN:
                    return "unknown";
                case self::TYPE_INT:
                    return "integer";
                case self::TYPE_LONG:
                    return "long";
                case self::TYPE_SHORT:
                    return "short";
                case self::TYPE_BOOLEAN:
                    return "boolean";
                case self::TYPE_FLOAT:
                    return "float";
                case self::TYPE_STRING:
                    return "string";
                case self::TYPE_CHAR:
                    return "char";
                case self::TYPE_VARCHAR:
                    return "varchar";
                case self::TYPE_ARRAY:
                    return "array";
                case self::TYPE_OBJECT:
                    return "object";
                case self::TYPE_DATE:
                    return "date";
            }
        }
        return (string) $type;
    }
22078
public static function format($type)
    {
        switch ($type) {
            case self::TYPE_CREATED:
                return 'Created';

            case self::TYPE_STARTING:
                return 'Starting';

            case self::TYPE_RUNNING:
                return 'Running';

            case self::TYPE_ENDING:
                return 'Ending';

            case self::TYPE_FINISHED:
                return 'Finished';

            case self::TYPE_SUCCESS:
                return 'Success';

            case self::TYPE_FAILURE:
                return 'Failure';

            default:
                return 'Unknown';
        }
    }
669864
public static function getResource(string $type)
    {
        if (isset(self::$resources[$type])) {
            return self::$resources[$type];
        }
        $class = '\\sdopx\\resource\\' . Utils::toCamel($type) . 'Resource';
        if (class_exists($class)) {
            self::$resources[$type] = new $class();
            return self::$resources[$type];
        }
        return null;
    }
727456
public function getContent($type = '\\')
    {
        $content = '';
        if ($this->_borderLeft) {
            $content .= $type . 'brdrl' . $this->_borderLeft->getContent();
        }
        if ($this->_borderRight) {
            $content .= $type . 'brdrr' . $this->_borderRight->getContent();
        }
        if ($this->_borderTop) {
            $content .= $type . 'brdrt' . $this->_borderTop->getContent();
        }
        if ($this->_borderBottom) {
            $content .= $type . 'brdrb' . $this->_borderBottom->getContent();
        }
        return $content;
    }
755599
public function getFormUrl($type = null)
    {
        $type = strtoupper($type);
        return $this->client->getFormBaseUrl() . $type . '.js?' . $this->getPaymentUrlQueryString(
            self::FORM_TYPE_FL === $type || self::FORM_TYPE_FLS === $type
        );
    }
711835
protected function getTypeForString($type)
    {
        switch ($type) {
            case 'string':
                return DataTypes::STRING_TYPE;
            case 'number':
                return DataTypes::NUMBER_TYPE;
            case 'date':
            case 'datetime':
                return DataTypes::DATETIME_TYPE;
            case 'boolean':
                return DataTypes::BOOLEAN_TYPE;
            case 'tags':
                return DataTypes::TAGS_TYPE;
            case 'auto-complete':
                return DataTypes::AUTO_COMPLETE_TYPE;
            default:
                return DataTypes::UNDEFINED_TYPE;
        }
    }
449867
public function fileAction( $type )
	{
		$contents = '';
		$files = array();
		$aimeos = $this->get( 'aimeos' )->get();

		foreach( $aimeos->getCustomPaths( 'admin/jqadm' ) as $base => $paths )
		{
			foreach( $paths as $path )
			{
				$jsbAbsPath = $base . '/' . $path;
				$jsb2 = new \Aimeos\MW\Jsb2\Standard( $jsbAbsPath, dirname( $jsbAbsPath ) );
				$files = array_merge( $files, $jsb2->getFiles( $type ) );
			}
		}

		foreach( $files as $file )
		{
			if( ( $content = file_get_contents( $file ) ) !== false ) {
				$contents .= $content;
			}
		}

		$response = new Response( $contents );

		if( $type === 'js' ) {
			$response->headers->set( 'Content-Type', 'application/javascript' );
		} elseif( $type === 'css' ) {
			$response->headers->set( 'Content-Type', 'text/css' );
		}

		return $response;
	}
909479
protected function getFulfillmentMethodsByType($type)
    {
        if (!$this->fulfillmentMethodsByType) {
            $this->loadFulfillmentMethods();
        }

        return $this->fulfillmentMethodsByType->get($type);
    }
551267
public function getPart($type)
    {
        $parts = $this->getParts();

        foreach ($parts as $part) {
            if (0 === strpos($part->getHeaders()->get('Content-Type'), $type)) {
                return $part;
            }
        }

        throw new \InvalidArgumentException(sprintf('Unable to find part with Content-Type "%s" in parts. Got: %s', $type, implode("", array_map(function ($part) {
            return "\n- ".$part->getHeaders()->get('Content-Type');
        }, $parts))));
    }