mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
New look for iTop !
SVN:trunk[3601]
This commit is contained in:
41
lib/sass/haml/tree/HamlCommentNode.php
Normal file
41
lib/sass/haml/tree/HamlCommentNode.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/* SVN FILE: $Id: HamlCommentNode.php 49 2010-04-04 10:51:24Z chris.l.yates $ */
|
||||
/**
|
||||
* HamlCommentNode class file.
|
||||
* @author Chris Yates <chris.l.yates@gmail.com>
|
||||
* @copyright Copyright (c) 2010 PBM Web Development
|
||||
* @license http://phamlp.googlecode.com/files/license.txt
|
||||
* @package PHamlP
|
||||
* @subpackage Haml.tree
|
||||
*/
|
||||
|
||||
/**
|
||||
* HamlCommentNode class.
|
||||
* Represents a comment, including MSIE conditional comments.
|
||||
* @package PHamlP
|
||||
* @subpackage Haml.tree
|
||||
*/
|
||||
class HamlCommentNode extends HamlNode {
|
||||
private $isConditional;
|
||||
|
||||
public function __construct($content, $parent) {
|
||||
$this->content = $content;
|
||||
$this->isConditional = (bool)preg_match('/^\[.+\]$/', $content, $matches);
|
||||
$this->parent = $parent;
|
||||
$this->root = $parent->root;
|
||||
$parent->children[] = $this;
|
||||
}
|
||||
|
||||
public function getIsConditional() {
|
||||
return $this->isConditional;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$output = $this->renderer->renderOpenComment($this);
|
||||
foreach ($this->children as $child) {
|
||||
$output .= $child->render();
|
||||
} // foreach
|
||||
$output .= $this->renderer->renderCloseComment($this);
|
||||
return $this->debug($output);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user