OPiQuotations  v.03.00.00 — April 5, 2019
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
OPiQuotations\Selection Class Reference

Class selection. More...

Public Member Functions

 __construct ($label, $datetime_utc, $url=null)
 Construct a selection. More...
 
 datetime_utc ()
 Return the date/time of the selection. More...
 
 label ()
 Return the label used to identify an application that already chosen a quotation. More...
 
 to_html ($link_target, $tag='li')
 Return the selection in a HTML format. By default in a <li> item. More...
 
 url ()
 Return null or URL to the quotation in the application. More...
 

Static Public Member Functions

static _selections_to_html_ul ($selections, $link_target=null)
 Return the list of selections in a HTML format, in a <ul class="selections"> item. More...
 

Protected Attributes

 $label
 Label to identify an application that already chosen a quotation. More...
 
 $datetime_utc
 date/time of the selection. More...
 
 $url
 null or URL to the quotation in the application. More...
 

Detailed Description

Class selection.

Used by applications to save quotations already chosen.

Definition at line 953 of file OPiQuotation.inc.

Constructor & Destructor Documentation

◆ __construct()

OPiQuotations\Selection::__construct (   $label,
  $datetime_utc,
  $url = null 
)

Construct a selection.

If $datetime_utc === null then use the current time.

See to_html().

Parameters
string$label
null | DateTime$datetime_utc
null | string$url

Definition at line 966 of file OPiQuotation.inc.

References $url.

Member Function Documentation

◆ _selections_to_html_ul()

static OPiQuotations\Selection::_selections_to_html_ul (   $selections,
  $link_target = null 
)
static

Return the list of selections in a HTML format, in a <ul class="selections"> item.

If $link_target then add a target attribut to the link.

Parameters
array(Selection)$selections
null | string$link_target
Returns
string

Definition at line 996 of file OPiQuotation.inc.

References $selection.

◆ datetime_utc()

OPiQuotations\Selection::datetime_utc ( )

Return the date/time of the selection.

Returns
DateTime

Definition at line 1026 of file OPiQuotation.inc.

◆ label()

OPiQuotations\Selection::label ( )

Return the label used to identify an application that already chosen a quotation.

Returns
string

Definition at line 1038 of file OPiQuotation.inc.

◆ to_html()

OPiQuotations\Selection::to_html (   $link_target,
  $tag = 'li' 
)

Return the selection in a HTML format. By default in a <li> item.

If $link_target then add a target attribut to the link.

Parameters
null | string$link_target
string$tag
Returns
string

Definition at line 1056 of file OPiQuotation.inc.

References $title.

◆ url()

OPiQuotations\Selection::url ( )

Return null or URL to the quotation in the application.

Returns
null|string

Definition at line 1088 of file OPiQuotation.inc.

References $url.

Member Data Documentation

◆ $datetime_utc

DateTime OPiQuotations\Selection::$datetime_utc
protected

date/time of the selection.

Definition at line 1104 of file OPiQuotation.inc.

◆ $label

string OPiQuotations\Selection::$label
protected

Label to identify an application that already chosen a quotation.

Definition at line 1098 of file OPiQuotation.inc.

◆ $url

null string OPiQuotations\Selection::$url
protected

null or URL to the quotation in the application.

Like this: https://twitter.com/OPiCitationJour/status/763268655845085184

Definition at line 1112 of file OPiQuotation.inc.


The documentation for this class was generated from the following file: