Exemplo n.º 1
0
 /**
  * getCurrent
  * 
  * Get the current location
  * 
  * @name getCurrent
  * @access public
  * @return array
  */
 public function getCurrent()
 {
     return Destination::getCurrent();
 }
Exemplo n.º 2
0
 */
require_once 'helper/loader.php';
echo "<h1>Create Destination :: Class Demo</h1>";
echo "<p>\n\tSteps are starting from <b>A</b> to <b>L</b>\n\t<br />\n\tIn this demo start point sets to <b>B</b> and end point <b>J</b> and current location <b>D</b>\n\t</p>";
Destination::add('A', 'Info here');
Destination::add('B', 'Info here');
Destination::add('C', 'Info here');
Destination::add('D', 'Info here');
Destination::add('E', 'Info here');
Destination::add('F', 'Info here');
Destination::add('J', 'Info here');
Destination::add('K', 'Info here');
Destination::add('L', 'Info here');
Destination::setBegin('B');
Destination::setCurrent('D');
Destination::setEnd('J');
echo "<h2>Current point:</h2><pre>";
print_r(Destination::getCurrent());
echo "</pre>";
echo "<h2>Next point:</h2><pre>";
print_r(Destination::getNext());
echo "</pre>";
echo "<h2>Previous point:</h2><pre>";
print_r(Destination::getPrev());
echo "</pre>";
echo "<h2>All next steps:</h2><pre>getAllNext";
print_r(Destination::getAllNext());
echo "</pre>";
echo "<h2>All Previous steps:</h2><pre>";
print_r(Destination::getAllPrev());
echo "</pre>";