summaryrefslogtreecommitdiff
path: root/buildscripts/phing/tasks/ManualIndexTask.php
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/phing/tasks/ManualIndexTask.php')
-rw-r--r--buildscripts/phing/tasks/ManualIndexTask.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/buildscripts/phing/tasks/ManualIndexTask.php b/buildscripts/phing/tasks/ManualIndexTask.php
new file mode 100644
index 00000000..5b0febc6
--- /dev/null
+++ b/buildscripts/phing/tasks/ManualIndexTask.php
@@ -0,0 +1,38 @@
+<?php
+
+require_once 'phing/Task.php';
+
+/**
+ * Task to index PRADO API docs.
+ */
+class ManualIndexTask extends Task
+{
+ private $docdir;
+ private $todir;
+
+ /**
+ * @param string the API documentation directory
+ */
+ public function setDocdir($value)
+ {
+ $this->docdir=$value;
+ }
+
+ public function setTodir($value)
+ {
+ $this->todir=$value;
+ }
+
+ public function main()
+ {
+ $srcdir=realpath(dirname(__FILE__).'/../../../');
+ $zend_path = $srcdir.'/demos/quickstart/protected/index';
+ set_include_path(get_include_path().PATH_SEPARATOR.realpath($zend_path));
+ require_once ('Zend/Search/Lucene.php');
+ require_once($srcdir.'/buildscripts/index/API_index.php');
+ $api = new api_index($this->todir, realpath($this->docdir));
+ $api->create_index();
+ }
+}
+
+?> \ No newline at end of file