|
From: <gem...@li...> - 2012-08-29 14:56:01
|
Revision: 911
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=911&view=rev
Author: matijsdejong
Date: 2012-08-29 14:55:50 +0000 (Wed, 29 Aug 2012)
Log Message:
-----------
Removed Lazy functions from code
Added comments
Modified Paths:
--------------
trunk/library/classes/Gems/Menu.php
trunk/library/classes/MUtil/Lazy/Procrastinator.php
trunk/library/classes/MUtil/Lazy.php
trunk/library/pre_bootstrap.php
trunk/test/classes/MUtil/Parser/Sql/WordsParserTest.php
Modified: trunk/library/classes/Gems/Menu.php
===================================================================
--- trunk/library/classes/Gems/Menu.php 2012-08-29 14:21:36 UTC (rev 910)
+++ trunk/library/classes/Gems/Menu.php 2012-08-29 14:55:50 UTC (rev 911)
@@ -290,7 +290,7 @@
->setHiddenOrgId($orgId);
/*
- iff(
+ MUtil_Lazy::iff(
is('gr2o_id_organization', $this->escort->getCurrentOrganization()),
aget(MUtil_Model::REQUEST_ID, 'gr2o_patient_nr'),
aget(MUtil_Model::REQUEST_ID1, 'gr2o_patient_nr', MUtil_Model::REQUEST_ID2, 'gr2o_id_organization')
@@ -338,7 +338,7 @@
->addAutofilterAction();
/*
- iff(is('gtr_track_type', $trType), aget(MUtil_Model::REQUEST_ID, 'gr2o_patient_nr', Gems_Model::TRACK_ID, 'gtr_id_track'))
+ MUtil_Lazy::iff(is('gtr_track_type', $trType), aget(MUtil_Model::REQUEST_ID, 'gr2o_patient_nr', Gems_Model::TRACK_ID, 'gtr_id_track'))
*/
$trPage->addAction($this->_('Add'), 'pr.track.create', 'create')
->setNamedParameters($params)
Modified: trunk/library/classes/MUtil/Lazy/Procrastinator.php
===================================================================
--- trunk/library/classes/MUtil/Lazy/Procrastinator.php 2012-08-29 14:21:36 UTC (rev 910)
+++ trunk/library/classes/MUtil/Lazy/Procrastinator.php 2012-08-29 14:55:50 UTC (rev 911)
@@ -1,41 +1,46 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
/**
- * @author Matijs de Jong
- * @since 1.0
- * @version 1.1
- * @package MUtil
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package MUtil
* @subpackage Lazy
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
*/
+/**
+ * @package MUtil
+ * @subpackage Lazy
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
+ */
interface MUtil_Lazy_Procrastinator
{
/**
Modified: trunk/library/classes/MUtil/Lazy.php
===================================================================
--- trunk/library/classes/MUtil/Lazy.php 2012-08-29 14:21:36 UTC (rev 910)
+++ trunk/library/classes/MUtil/Lazy.php 2012-08-29 14:55:50 UTC (rev 911)
@@ -126,6 +126,12 @@
return new MUtil_Lazy_Call(array($if, 'if'), array($then, $else));
}
+ /**
+ * Returns a Lazy version of the parameter
+ *
+ * @param mixed $var
+ * @return MUtil_Lazy_LazyInterface
+ */
public static function L($var)
{
if (is_object($var)) {
@@ -269,4 +275,4 @@
{
return MUtil_Lazy::L($var);
}
- }
\ No newline at end of file
+ }
Modified: trunk/library/pre_bootstrap.php
===================================================================
--- trunk/library/pre_bootstrap.php 2012-08-29 14:21:36 UTC (rev 910)
+++ trunk/library/pre_bootstrap.php 2012-08-29 14:55:50 UTC (rev 911)
@@ -1,10 +1,9 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -15,7 +14,7 @@
* * Neither the name of Erasmus MC nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -68,7 +67,7 @@
set_include_path(
GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR .
APPLICATION_PATH . '/classes' . PATH_SEPARATOR .
- get_include_path()
+ get_include_path()
//. PATH_SEPARATOR . GEMS_ROOT_DIR . '/library' //Shouldn't be needed, uncomment when neccessary
);
@@ -78,7 +77,7 @@
);
// Make sure Lazy is loaded
-defined('MUTIL_LAZY_FUNCTIONS') || define('MUTIL_LAZY_FUNCTIONS', 1);
+// defined('MUTIL_LAZY_FUNCTIONS') || define('MUTIL_LAZY_FUNCTIONS', 1);
require_once 'MUtil/Lazy.php';
// Zend_Application: loads the autoloader
Modified: trunk/test/classes/MUtil/Parser/Sql/WordsParserTest.php
===================================================================
--- trunk/test/classes/MUtil/Parser/Sql/WordsParserTest.php 2012-08-29 14:21:36 UTC (rev 910)
+++ trunk/test/classes/MUtil/Parser/Sql/WordsParserTest.php 2012-08-29 14:55:50 UTC (rev 911)
@@ -28,7 +28,7 @@
*
*
* @package MUtil
- * @subpackage Parser
+ * @subpackage Parser_Sql
* @author Matijs de Jong <mj...@ma...>
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
@@ -41,7 +41,7 @@
*
*
* @package MUtil
- * @subpackage Parser
+ * @subpackage Parser_Sql
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
* @since Class available since version 1.5
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|