Function Block_main_quotes->get_random_line

Definitions

sources/blocks/main_quotes.php

  • Get a random line from a file.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$filename PATH No No required parameter N/A N/A The filename

Returns

  • The random line
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get a random line from a file.
 *
 * @param  PATH $filename The filename
 * @return string The random line
 */

protected function get_random_line(string $filename) : string