src/View/Output/Chunks.php
public function chunkMe($string)
    {
        if ($this->useChunks === true && strlen($string) > 10000) {
            // Get the key.
            $key = $this->genKey();
            // Detect the encoding in the chunk.
            $this->detectEncoding($string);
            // Write the key to the chunks folder.
            $this->pool->fileService->putFileContents($this->chunkDir . $key . '.Krexx.tmp', $string);
            // Return the first part plus the key.
            return static::STRING_DELIMITER . $key . static::STRING_DELIMITER;
        }

        // Return the original, because it's too small.
        return $string;
    }
public function chunkMe($string)
    {
        if ($this->useChunks === true && strlen($string) > 10000) {
            // Get the key.
            $key = $this->genKey();
            // Detect the encoding in the chunk.
            $this->detectEncoding($string);
            // Write the key to the chunks folder.
            $this->pool->fileService->putFileContents($this->chunkDir . $key . '.Krexx.tmp', $string);
            // Return the first part plus the key.
            return static::STRING_DELIMITER . $key . static::STRING_DELIMITER;
        }

        // Return the original, because it's too small.
        return $string;
    }
public function chunkMe ( $ string ) { if ( $ this -> useChunks === true && strlen ( $ string ) > 10000 ) { // Get the key. $ key = $ this -> genKey ( ) ; // Detect the encoding in the chunk. $ this -> detectEncoding ( $ string ) ; // Write the key to the chunks folder. $ this -> pool -> fileService -> putFileContents ( $ this -> chunkDir . $ key . '.Krexx.tmp' , $ string ) ; // Return the first part plus the key. return static :: STRING_DELIMITER . $ key . static :: STRING_DELIMITER ; } // Return the original, because it's too small. return $ string ; }
Splits a string into small chunks.

The chunks are saved to disk and later on.

@param string $string
The data we want to split into chunks.

@return string
The key to the chunk, wrapped up in @@@@@@.
Splits a string into small chunks .