Sistema de documentación y gestión de páginas Web para un entorno o proyecto Web.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
WMarkDown/PHP/Abstracts/WMarkDown.Abstracts.Modules...

51 lines
1.3 KiB

<?php
namespace WMarkDown\Abstracts;
abstract class Modules implements \WMarkDown\Interfaces\Modules{
protected $wmarkdown;
protected $more = true;
protected $from = -1;
protected $length = 0;
protected $to = 0;
protected $content = '';
protected $html = '';
protected $matches = null;
public function __construct($wmarkdown){
$this->wmarkdown = $wmarkdown;
}
public function reset(){
$this->more = true;
$this->from = -1;
}
public function set_position($new_position){
$this->from -= $new_position;
$this->to -= $new_position;
}
public function get_position($string){
if($this->from < 0 && $this->more)
$this->get_next_position($string);
return $this->more ? $this->from : null;
}
public function has_more(){return !!$this->more;}
public function get_from(){return 0 | $this->from;}
public function get_length(){return 0 | $this->length;}
public function get_to(){return 0 | $this->to;}
public function get_content(){return "" . $this->content;}
public function get_html(){return "" . $this->html;}
}