File: D:/HostingSpaces/SBogers10/ilysium.komma.pro/wwwroot/lib/ui/button.class.php
<?php
/**
* button.php
* Created by Komma Mediadesign.
* Author: mike
* Date: 31/07/14
*/
class Button
{
// A or Input
private $_type;
// Href
private $_href;
// Label
private $_label;
public function __construct($type = 'a')
{
$this->_href = '#';
$this->_label = '';
$this->_type = $type;
}
// Set value
public function set($prop,$val)
{
$this->{$prop} = $val;
}
// Create btn
public function create()
{
$basic = array('a','span');
if( ! in_array($this->_type,$basic))
{
$this->createInput();
exit;
}
// output
$output = '';
$output .= '<' . $this->_type;
if($this->_type == 'a') $output .= ' href="' . $this->_href . '"';
$output .= ' class="btn">' . $this->_label . '<span class="arrow"></span></' . $this->_type . '>';
return $output;
}
public function createInput()
{
}
}