[pLog-svn] r1861 - plog/trunk/class/security
Mark Wu
markplace at gmail.com
Tue Apr 19 10:44:43 GMT 2005
Yes ... Bravo
Then, I can have a new view, instead of a mixed view with error message :D
But, I still have no idea how to prevent the summary to show secret post. :(
Mark
-----Original Message-----
From: plog-svn-bounces at devel.plogworld.net
[mailto:plog-svn-bounces at devel.plogworld.net] On Behalf Of
oscar at devel.plogworld.net
Sent: Monday, April 18, 2005 4:51 AM
To: plog-svn at devel.plogworld.net
Subject: [pLog-svn] r1861 - plog/trunk/class/security
Author: oscar
Date: 2005-04-17 20:50:38 +0000 (Sun, 17 Apr 2005) New Revision: 1861
Modified:
plog/trunk/class/security/pipelineresult.class.php
Log:
added the hasView(), getView() and setView() methods that allow
PipelineResult objects to provide their own views instead of relying on the
ErrorView. I think Mark requested something like this a while ago :), and
basically it could be used by plugins that register their custom filters to
show their own views to do cooler things instead of as it is done now.
Modified: plog/trunk/class/security/pipelineresult.class.php
===================================================================
--- plog/trunk/class/security/pipelineresult.class.php 2005-04-17 20:46:58
UTC (rev 1860)
+++ plog/trunk/class/security/pipelineresult.class.php 2005-04-17 20:50:38
UTC (rev 1861)
@@ -29,6 +29,7 @@
$this->_valid = $valid;
$this->_errorCode = $errorCode;
$this->_errorMessage = $errorMessage;
+ $this->_view = null;
}
/**
@@ -97,5 +98,38 @@
return true;
}
+
+ /**
+ * Whether this result object has a custom view or not
+ *
+ * @return True if there is a custom view object that should
be shown instead of the
+ * default one or false otherwise
+ */
+ function hasView()
+ {
+ return( $this->_view != null );
+ }
+
+ /**
+ * Returns a custom view that can be used instead of the
default
+ * ErrorView
+ *
+ * @param view A valid View, or a class extending from the
base View
+ * @return nothing
+ */
+ function setView( $view )
+ {
+ $this->_view = $view;
+ }
+
+ /**
+ * returns the custom view, if any
+ *
+ * @return A valid View, or a class extending from the base
View
+ */
+ function getView()
+ {
+ return( $this->_view );
+ }
}
?>
\ No newline at end of file
_______________________________________________
pLog-svn mailing list
pLog-svn at devel.plogworld.net
http://devel.plogworld.net/mailman/listinfo/plog-svn
More information about the pLog-svn
mailing list