src/libraries/models/Photo.php
/**
    * When a custom version of a photo needs to be generated it must be accompanied by a hash.
    * This method generates that hash based on a secret and normalization of parameters.
    * The method takes any number of arguments and processes them all.
    *
    * @param string $param1 any parameter value
    * ...
    * @param string $paramN any parameter value
    * @return mixed string on success, FALSE on error
    */
When a custom version of a photo needs to be generated it must be accompanied by a hash.
This method generates that hash based on a secret and normalization of parameters.
The method takes any number of arguments and processes them all.

@param string $param1 any parameter value

@param string $paramN any parameter value
@return mixed string on success, FALSE on error
When a custom version of a photo needs to be generated it must be accompanied by a hash . This method generates that hash based on a secret and normalization of parameters . The method takes any number of arguments and processes them all . @param string $param1 any parameter value @param string $paramN any parameter value @return mixed string on success FALSE on error
public function generateHash()
  {
    $args = func_get_args();
    if(count($args) === 0)
      return false;
    foreach($args as $k => $v)
    {
      if(strlen($v) == 0)
        unset($args[$k]);
    }
    $args[] = $this->config->secrets->secret;
    return substr(sha1(implode('.', $args)), 0, 5);
  }
public function generateHash ( ) { $ args = func_get_args ( ) ; if ( count ( $ args ) === 0 ) return false ; foreach ( $ args as $ k => $ v ) { if ( strlen ( $ v ) == 0 ) unset ( $ args [ $ k ] ) ; } $ args [ ] = $ this -> config -> secrets -> secret ; return substr ( sha1 ( implode ( '.' , $ args ) ) , 0 , 5 ) ; }
When a custom version of a photo needs to be generated it must be accompanied by a hash.
When a custom version of a photo needs to be generated it must be accompanied by a hash .
/*$args1, $args2, ...*/