<?php
/**
* @version 1.0.0
* @category Anahita Social Engineâ¢
* @copyright Copyright (C) 2008 - 2010 rmdStudio Inc. and Peerglobe Technology Inc. All rights reserved.
* @license GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
* @link http://www.anahitapolis.com
*/
class AnModelStoryDataText extends KObject implements AnModelStoryDataInterface
{
/**
* Text
*/
public $text;
/**
* Link href
*/
public $href;
/**
* Constructor Accept two parameters $text and $href
* @return
* @param $options Object[optional]
*/
public function __construct(array $options = array())
{
$options = $this->_initialize($options);
$this->text = $options['text'];
$this->href = $options['href'];
}
/**
* Initialize object
* @return Array
* @param $options Array
*/
protected function _initialize(array $options = array())
{
$default = array(
'href' => null
);
return array_merge($default, $options);
}
/**
*
* @return
*/
public function __toString()
{
return $this->href ? '<a href="'.$this->href.'">'.stripslashes($this->text).'</a>' : $this->text;
}
//end class
}