public static function fromContent($content) { // Make sure to get the real length in byte and not // accidentally mistake some bytes as a UTF BOM. return mb_strlen($content, '8bit'); }
/** * {@inheritdoc} */ public function write($key, $content, array $metadata = null) { $result = apc_store($this->computePath($key), $content, $this->ttl); if (!$result) { return false; } return Util\Size::fromContent($content); }