Function Mail_dispatcher_base->get_image_for_cid

Definitions

sources/mail.php

  • Download a URL, for use as an inline mail image.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$img URLPATH No No required parameter N/A N/A URL
$as ?MEMBER No No required parameter N/A N/A Convert Comcode->tempcode as this member (a privilege thing: we don't want people being able to use admin rights by default!) (null: guest)
&$total_filesize integer Yes No required parameter N/A N/A Reference to where total filesize is being held

Returns

  • A tuple: Mime type filename, file contents (null: error)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Download a URL, for use as an inline mail image.
 *
 * @param  URLPATH $img URL
 * @param  ?MEMBER $as Convert Comcode->tempcode as this member (a privilege thing: we don't want people being able to use admin rights by default!) (null: guest)
 * @param  integer $total_filesize Reference to where total filesize is being held
 * @return ?array A tuple: Mime type filename, file contents (null: error)
 */

protected function get_image_for_cid(string $img, ?int $as, int &$total_filesize) : ?array