Skip to content

Commit

Permalink
added getter method to retrieve markup
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Tessore committed Nov 21, 2014
1 parent f837546 commit 0b7e371
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion SubstitutionTemplate.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ public function set_tpl($tpl){
return $this;
}

/**
* Retrieves the markup for the given key
* It returns false if the key isn't defined
* @param string $key key to be searched
*/
public function get_markup($key){
if(isset($this->static_markup[$key]))
return $this->static_markup[$key];
return false;
}

/**
* Set the static markup; ie: prev\next\loading divs
* @param string|array $key the searches to be substituted
Expand Down Expand Up @@ -88,4 +99,4 @@ public function replace_markup(){
$this->tpl
);
}
}
}

0 comments on commit 0b7e371

Please sign in to comment.