Back to StringController class

Method getRef

public mixed
getRef
(mixed $reference)
Get reference
Parameters
  • string $reference The key for the reference.
Returns
  • mixed False if not set, reference if it exists
Since
  • 1.7.0

Method getRef - Source code

/**
 * Get reference
 *
 * @param   string  $reference  The key for the reference.
 *
 * @return  mixed  False if not set, reference if it exists
 *
 * @since   1.7.0
 */
public function getRef($reference)
{
    $ref =& self::_getArray();
    if (isset($ref[$reference])) {
        return $ref[$reference];
    } else {
        return false;
    }
}