* @var resource
*/
private $fd;
-
+
/**
* Open the file
* @param string $path
public function __construct($path) {
$this->fd = fopen($path, "rb");
}
-
+
/**
* Read the title of the refentry
* @return string
return fgets($this->fd);
}
}
-
+
/**
* Read the description of the refentry
* @return string
return fgets($this->fd);
}
}
-
+
/**
* Read the first subsection of a global refentry
* @return string
$intro = "";
if (0 === fseek($this->fd, 0, SEEK_SET)) {
$header = false;
-
+
while (!feof($this->fd)) {
if (false === ($line = fgets($this->fd))) {
break;