Calendar
[ class tree: Calendar ] [ index: Calendar ] [ all elements ]

Class: Calendar_Util_Uri

Source Location: /Calendar-0.5.5/Util/Uri.php

Class Overview


Utility to help building HTML links for navigating the calendar


Author(s):

Copyright:

  • 2003-2007 Harry Fuecks, Lorenzo Alberton

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 62]
Utility to help building HTML links for navigating the calendar

  1.  $Day = new Calendar_Day(20031023);
  2.  $Uri = new Calendar_Util_Uri('year''month''day');
  3.  echo $Uri->prev($Day,'month')// Displays year=2003&month=10
  4.  echo $Uri->prev($Day,'day')// Displays year=2003&month=10&day=22
  5.  $Uri->seperator = '/';
  6.  $Uri->scalar = true;
  7.  echo $Uri->prev($Day,'month')// Displays 2003/10
  8.  echo $Uri->prev($Day,'day')// Displays 2003/10/22



[ Top ]


Class Variables

$scalar =  false

[line 86]

To output a "scalar" string - variable names omitted.

Used for urls like index.php/2004/8/12

  • Var: (default false)
  • Access: public

Type:   boolean


[ Top ]

$separator =  '&'

[line 78]

String to separate fragments with.

Set to just & for HTML. For a scalar URL you might use / as the seperator

  • Var: (default XHTML &)
  • Access: public

Type:   string


[ Top ]



Method Detail

Calendar_Util_Uri (Constructor)   [line 101]

Calendar_Util_Uri Calendar_Util_Uri( string $y, [string $m = null], [string $d = null], [string $h = null], [string $i = null], [string $s = null])

Constructs Calendar_Decorator_Uri The term "fragment" means name of a calendar GET variables in the URL
  • Access: public

Parameters:

string   $y   —  URI fragment for year
string   $m   —  (optional) URI fragment for month
string   $d   —  (optional) URI fragment for day
string   $h   —  (optional) URI fragment for hour
string   $i   —  (optional) URI fragment for minute
string   $s   —  (optional) URI fragment for second

[ Top ]

next   [line 170]

string next( object $Calendar, string $unit)

Gets the URI string for the next calendar unit
  • Access: public

Parameters:

object   $Calendar   —  subclassed from Calendar e.g. Calendar_Month
string   $unit   —  calendar unit (year|month|week|day|hour|minute|second)

[ Top ]

prev   [line 138]

string prev( object $Calendar, string $unit)

Gets the URI string for the previous calendar unit
  • Access: public

Parameters:

object   $Calendar   —  subclassed from Calendar e.g. Calendar_Month
string   $unit   —  calendar unit (year|month|week|day|hour|minute|second)

[ Top ]

setFragments   [line 119]

void setFragments( string $y, [string $m = null], [string $d = null], [string $h = null], [string $i = null], [string $s = null])

Sets the URI fragment names
  • Access: public

Parameters:

string   $y   —  URI fragment for year
string   $m   —  (optional) URI fragment for month
string   $d   —  (optional) URI fragment for day
string   $h   —  (optional) URI fragment for hour
string   $i   —  (optional) URI fragment for minute
string   $s   —  (optional) URI fragment for second

[ Top ]

this   [line 154]

string this( object $Calendar, string $unit)

Gets the URI string for the current calendar unit
  • Access: public

Parameters:

object   $Calendar   —  subclassed from Calendar e.g. Calendar_Month
string   $unit   —  calendar unit (year|month|week|day|hour|minute|second)

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:37:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.