src/libraries/models/Photo.php
/**
    * Generates a path for a custom version of a photo.
    * This defines in a deterministic way what the URL for this version of the photo will be.
    *
    * @param string $basePath Path to the base version of the photo from the database.
    * @param int $width The width of the desired photo version.
    * @param int $height The height of the desired photo version.
    * @param string $options The options for the desired photo version.
    * @return string The path to be used for this photo.
    */
Generates a path for a custom version of a photo.
This defines in a deterministic way what the URL for this version of the photo will be.

@param string $basePath Path to the base version of the photo from the database.
@param int $width The width of the desired photo version.
@param int $height The height of the desired photo version.
@param string $options The options for the desired photo version.
@return string The path to be used for this photo.
Generates a path for a custom version of a photo . This defines in a deterministic way what the URL for this version of the photo will be . @param string $basePath Path to the base version of the photo from the database . @param int $width The width of the desired photo version . @param int $height The height of the desired photo version . @param string $options The options for the desired photo version . @return string The path to be used for this photo .
private function generateCustomUrl($basePath, $width, $height, $options)
  {
    $fragment = $this->generateFragment($width, $height, $options);
    $customPath = preg_replace('#^/base/#', '/custom/', $basePath);
    if(stristr($customPath, '.') === false)
      return "{$customPath}_{$fragment}.jpg";
    $customName = substr($customPath, 0, strrpos($customPath, '.'));
    return "{$customName}_{$fragment}.jpg";
  }
private function generateCustomUrl ( $ basePath , $ width , $ height , $ options ) { $ fragment = $ this -> generateFragment ( $ width , $ height , $ options ) ; $ customPath = preg_replace ( '#^/base/#' , '/custom/' , $ basePath ) ; if ( stristr ( $ customPath , '.' ) === false ) return " { $ customPath } _ { $ fragment } .jpg " ; $ customName = substr ( $ customPath , 0 , strrpos ( $ customPath , '.' ) ) ; return " { $ customName } _ { $ fragment } .jpg " ; }
Generates a path for a custom version of a photo.
Generates a path for a custom version of a photo .