phpDocumentor ycwp-qr-me
[ class tree: ycwp-qr-me ] [ index: ycwp-qr-me ] [ all elements ]

Class: QRCode

Source Location: /class.qrcode.php

Class QRCode

Class Overview

QRCode generator. Uses Google Charts API to generate QR Codes.

Located in /class.qrcode.php [line 19]



		
				Author(s):
		
		
		
Information Tags:
Version:  1.0
Copyright:  Copyright (c) 2012 Nicola Mustone

Properties

Methods

[ Top ]
Property Summary
string   $_GOOGLE_CHART_URL   Base path for QR Code Google request.
int   $_height   QR Code image height.
array   $_settings   QR COde image settings.
int   $_width   QR Code image width.

[ Top ]
Method Summary
QRCode   __construct()   Initialize properties.
string   QR_GET()   Send a GET request to Google for a QR Code.
string   QR_POST()   Send a POST request to Google for a QR Code. Required if the content is larger than 2 KB.
void   reset()   Re-initialize the properties
void   setCharSet()   Sets QR Code image content charset.
void   setContent()   Sets QR Code image content.
void   setErrorLevel()   Sets QR Code image error correction level and margin.
void   setHeight()   Sets QR Code image height.
void   setSize()   Sets QR Code image size.
void   setWidth()   Sets QR Code image width.
string   _makeURL()   Make the URL for the request.
bool   _setProperty()   Set the specified value for a property.
mixed|bool   __get()   Magic method to get properties value.

[ Top ]
Properties
string   $_GOOGLE_CHART_URL [line 27]

Base path for QR Code Google request.

API Tags:
Access:  private

Information Tags:
Since:  1.0

[ Top ]
int   $_height [line 45]

QR Code image height.

API Tags:
Access:  private

Information Tags:
Since:  1.0

[ Top ]
array   $_settings [line 54]

QR COde image settings.

API Tags:
Access:  private

Information Tags:
Since:  1.0

[ Top ]
int   $_width [line 36]

QR Code image width.

API Tags:
Access:  private

Information Tags:
Since:  1.0

[ Top ]
Methods


Constructor __construct  [line 59]

  QRCode __construct( )

Initialize properties.


API Tags:
Access:  public


[ Top ]
QR_GET  [line 171]

  string QR_GET( [array $params = array()]  )

Send a GET request to Google for a QR Code.

Parameters:
array   $params:  Additional params that will be added to the <img> tag.

API Tags:
Access:  public


[ Top ]
QR_POST  [line 192]

  string QR_POST( [array $params = array()]  )

Send a POST request to Google for a QR Code. Required if the content is larger than 2 KB.

Parameters:
array   $params:  Additional params that will be added to the <img> tag.

API Tags:
Access:  public


[ Top ]
reset  [line 229]

  void reset( )

Re-initialize the properties


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
setCharSet  [line 122]

  void setCharSet( string $charset  )

Sets QR Code image content charset.

Parameters:
string   $charset: 

API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
setContent  [line 146]

  void setContent( string $content  )

Sets QR Code image content.

Parameters:
string   $content: 

API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
setErrorLevel  [line 134]

  void setErrorLevel( string $level, [int $margin = 0]  )

Sets QR Code image error correction level and margin.

Parameters:
string   $level: 
int   $margin: 

API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
setHeight  [line 111]

  void setHeight( $h, int $height  )

Sets QR Code image height.

Parameters:
int   $height: 
   $h: 

API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
setSize  [line 85]

  void setSize( int $w, int $h  )

Sets QR Code image size.

Parameters:
int   $w: 
int   $h: 

API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
setWidth  [line 100]

  void setWidth( $w, int $width  )

Sets QR Code image width.

Parameters:
int   $width: 
   $w: 

API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
_makeURL  [line 275]

  string _makeURL( )

Make the URL for the request.


API Tags:
Access:  protected

Information Tags:
Since:  1.0

[ Top ]
_setProperty  [line 251]

  bool _setProperty( string $key, mixed $value, [bool $append = false], [string $separator = '|']  )

Set the specified value for a property.

Parameters:
string   $key:  Property name
mixed   $value: 
bool   $append:  Append the value, otherwise it will override
string   $separator: 

API Tags:
Access:  protected

Information Tags:
Since:  1.0

[ Top ]
__get  [line 157]

  mixed|bool __get( string $name  )

Magic method to get properties value.

Parameters:
string   $name:  Property name

API Tags:
Return:  False on failure
Access:  public

Information Tags:
Since:  1.0

[ Top ]

Documentation generated on Tue, 21 Feb 2012 23:46:12 +0100 by phpDocumentor 1.4.3