New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.3.0 #47

Merged
merged 74 commits into from Sep 25, 2016
Commits
Jump to file or symbol
Failed to load files and symbols.
+129 −120
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Refactoring code

  • Loading branch information...
emulienfou committed Sep 17, 2016
commit d35aedf85aa5b5cecc7574d12b6e7a46d9500d53
@@ -37,14 +37,14 @@
* In no event will the authors be held liable for any damages arising from the
* use of this software.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
*
* @link http://dwoo.org/
* @link http://dwoo.org/
*
* @version 1.1.1
* @date 2010-04-06
* @version 1.1.1
* @date 2010-04-06
*/
class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer
{
@@ -98,8 +98,8 @@ public function __sleep()
/**
* Initialize this Renderer.
*
* @param AgaviContext The current application context
* @param array An associative array of initialization parameters
* @param AgaviContext The current application context
* @param array An associative array of initialization parameters
*/
public function initialize(AgaviContext $context, array $parameters = array())
{
@@ -137,10 +137,10 @@ protected function getEngine()
if (!class_exists('Dwoo')) {
if (file_exists(dirname(__FILE__).'/../../../dwooAutoload.php')) {
// file was dropped with the entire dwoo package
require dirname(__FILE__).'/../../../dwooAutoload.php';
include dirname(__FILE__).'/../../../dwooAutoload.php';
} else {
// assume the dwoo package is in the include path
require 'dwooAutoload.php';
include 'dwooAutoload.php';
}
}
@@ -168,10 +168,10 @@ protected function getEngine()
/**
* Render the presentation and return the result.
*
* @param AgaviTemplateLayer The template layer to render
* @param array The template variables
* @param array The slots
* @param array Associative array of additional assigns
* @param AgaviTemplateLayer The template layer to render
* @param array The template variables
* @param array The slots
* @param array Associative array of additional assigns
*
* @return string A rendered result
*/
@@ -18,14 +18,14 @@
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the use of this software.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
*
* @link http://dwoo.org/
* @link http://dwoo.org/
*
* @version 1.0.0
* @date 2008-10-23
* @version 1.0.0
* @date 2008-10-23
*/
function Dwoo_Plugin_t_compile(Dwoo_Compiler $compiler, $string)
{
@@ -22,14 +22,14 @@
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the use of this software.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
*
* @link http://dwoo.org/
* @link http://dwoo.org/
*
* @version 1.0.0
* @date 2008-10-23
* @version 1.0.0
* @date 2008-10-23
*/
function Dwoo_Plugin_url_compile(Dwoo_Compiler $compiler, $route = null, $params = null, $options = null, array $rest = array())
{
@@ -15,16 +15,16 @@
* More information can be found here:
* {@link http://www.gnu.org/copyleft/lesser.html}
*
* @author Mark John S. Buenconsejo <mjwork@simpleteq.com>
* @author Giangi <giangi@qwerg.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @author Mark John S. Buenconsejo <mjwork@simpleteq.com>
* @author Giangi <giangi@qwerg.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
*
* @link http://dwoo.org/
* @link http://dwoo.org/
*
* @version 1.1.0
* @date 2009-07-18
* @version 1.1.0
* @date 2009-07-18
*/
class DwooView extends View
{
@@ -1,7 +1,7 @@
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
// The name of the directory where templates are located.
$config['template_dir'] = dirname(FCPATH).'/../application/views/';
@@ -12,15 +12,14 @@
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the use of this software.
*
* @author Stefan Verstege <stefan.verstege@newmedia.nl>
* @copyright Copyright (c) 2008, Stefan Verstege
* @license http://dwoo.org/LICENSE Modified BSD License
*
* @author Stefan Verstege <stefan.verstege@newmedia.nl>
* @copyright Copyright (c) 2008, Stefan Verstege
* @license http://dwoo.org/LICENSE Modified BSD License
* @link http://www.newmedia.nl/
*
* @link http://www.newmedia.nl/
*
* @version 1.1.0
* @date 2009-07-18
* @version 1.1.0
* @date 2009-07-18
*
* @uses the dwoo package from http://dwoo.org
*/
@@ -7,15 +7,15 @@
* In no event will the authors be held liable for any damages arising from the
* use of this software.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Marc Hodgins <mjh@hodginsmedia.com>
* @copyright Copyright (c) 2010, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Marc Hodgins <mjh@hodginsmedia.com>
* @copyright Copyright (c) 2010, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
*
* @link http://dwoo.org/
* @link http://dwoo.org/
*
* @version 1.2.0
* @date 2010-02-28
* @version 1.2.0
* @date 2010-02-28
*/
class Dwoo_Adapters_ZendFramework_Dwoo extends Dwoo_Core
{
@@ -33,9 +33,11 @@ public function __get($name)
return $this->getPluginProxy()->view->$name;
}
$trace = debug_backtrace();
trigger_error('Undefined property via __get(): '.$name.
trigger_error(
'Undefined property via __get(): '.$name.
' in '.$trace[0]['file'].
' on line '.$trace[0]['line'], E_USER_NOTICE);
' on line '.$trace[0]['line'], E_USER_NOTICE
);
return null;
}
@@ -9,15 +9,15 @@
* In no event will the authors be held liable for any damages arising from the
* use of this software.
*
* @author Denis Arh <denis@arh.cc>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Denis Arh, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
* @author Denis Arh <denis@arh.cc>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Denis Arh, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
*
* @link http://dwoo.org/
* @link http://dwoo.org/
*
* @version 1.0.0
* @date 2008-10-23
* @version 1.0.0
* @date 2008-10-23
*/
class Dwoo_Adapters_ZendFramework_PluginProxy implements IPluginProxy
{
@@ -7,16 +7,16 @@
* In no event will the authors be held liable for any damages arising from the
* use of this software.
*
* @author Denis Arh <denis@arh.cc>
* @author Stephan Wentz <stephan@wentz.it>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
* @author Denis Arh <denis@arh.cc>
* @author Stephan Wentz <stephan@wentz.it>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
*
* @link http://dwoo.org/
* @link http://dwoo.org/
*
* @version 1.1.0
* @date 2009-07-18
* @version 1.1.0
* @date 2009-07-18
*/
class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract
{
Copy path View file
@@ -68,15 +68,15 @@ public function process()
* called at compile time to define what the block should output in the compiled template code, happens when the
* block is declared basically this will replace the {block arg arg arg} tag in the template.
*
* @param DwooCompiler $compiler the compiler instance that calls this function
* @param array $params an array containing original and compiled parameters
* @param string $prepend that is just meant to allow a child class to call
* @param DwooCompiler $compiler the compiler instance that calls this function
* @param array $params an array containing original and compiled parameters
* @param string $prepend that is just meant to allow a child class to call parent::postProcessing($compiler, $params, "foo();") to add a command before the default commands are executed
* parent::postProcessing($compiler, $params, "foo();") to add a command before the
* default commands are executed
* @param string $append that is just meant to allow a child class to call
* @param string $append that is just meant to allow a child class to call parent::postProcessing($compiler, $params, null, "foo();") to add a command after the default commands are executed
* parent::postProcessing($compiler, $params, null, "foo();") to add a command after
* the default commands are executed
* @param string $type the type is the plugin class name used
* @param string $type the type is the plugin class name used
*
* @return string
*/
@@ -91,16 +91,16 @@ public static function preProcessing(DwooCompiler $compiler, array $params, $pre
*
* @see preProcessing
*
* @param DwooCompiler $compiler the compiler instance that calls this function
* @param array $params an array containing original and compiled parameters, see preProcessing() for
* @param DwooCompiler $compiler the compiler instance that calls this function
* @param array $params an array containing original and compiled parameters, see preProcessing() for more details
* more details
* @param string $prepend that is just meant to allow a child class to call
* @param string $prepend that is just meant to allow a child class to call parent::postProcessing($compiler, $params, "foo();") to add a command before the default commands are executed
* parent::postProcessing($compiler, $params, "foo();") to add a command before the
* default commands are executed
* @param string $append that is just meant to allow a child class to call
* @param string $append that is just meant to allow a child class to call parent::postProcessing($compiler, $params, null, "foo();") to add a command after the default commands are executed
* parent::postProcessing($compiler, $params, null, "foo();") to add a command after
* the default commands are executed
* @param string $content the entire content of the block being closed
* @param string $content the entire content of the block being closed
*
* @return string
*/
Copy path View file
@@ -20,7 +20,7 @@
* @copyright 2013-2016 David Sanchez
* @license http://dwoo.org/LICENSE Modified BSD License
* @version Release: 1.2.4
* @date 2016-10-16
* @date 2016-10-17
* @link http://dwoo.org/
*/
class Compiler implements ICompiler
Copy path View file
@@ -37,7 +37,7 @@
* @copyright 2013-2016 David Sanchez
* @license http://dwoo.org/LICENSE Modified BSD License
* @version Release: 1.2.4
* @date 2016-10-16
* @date 2016-10-17
* @link http://dwoo.org/
*/
class Core
Copy path View file
@@ -20,16 +20,16 @@
* @copyright 2013-2016 David Sanchez
* @license http://dwoo.org/LICENSE Modified BSD License
* @version Release: 1.2.4
* @date 2016-10-16
* @date 2016-10-17
* @link http://dwoo.org/
*/
interface ICompiler
{
/**
* compiles the provided string down to php code.
*
* @param Core $dwoo
* @param ITemplate $template the template to compile
* @param Core $dwoo
* @param ITemplate $template the template to compile
*
* @return string a compiled php code string
*/
Copy path View file
@@ -14,7 +14,7 @@
* @copyright 2013-2016 David Sanchez
* @license http://dwoo.org/LICENSE Modified BSD License
* @version Release: 1.2.4
* @date 2016-10-16
* @date 2016-10-17
* @link http://dwoo.org/
*/
interface ITemplate
@@ -136,16 +136,16 @@ public function getIsModifiedCode();
* necessary permission checks if required, if the security policy prevents the template
* generation it should throw a new Dwoo_Security_Exception with a relevant message
*
* @param mixed $resourceId the resource identifier
* @param int $cacheTime duration of the cache validity for this template,
* @param mixed $resourceId the resource identifier
* @param int $cacheTime duration of the cache validity for this template, if null it defaults to the Dwoo instance that will render this template
* if null it defaults to the Dwoo instance that will
* render this template
* @param string $cacheId the unique cache identifier of this page or anything else that
* @param string $cacheId the unique cache identifier of this page or anything else that makes this template's content unique, if null it defaults to the current url
* makes this template's content unique, if null it defaults
* to the current url
* @param string $compileId the unique compiled identifier, which is used to distinguish this
* @param string $compileId the unique compiled identifier, which is used to distinguish this template from others, if null it defaults to the filename+bits of the path
* template from others, if null it defaults to the filename+bits of the path
* @param ITemplate $parentTemplate the template that is requesting a new template object (through
* @param ITemplate $parentTemplate the template that is requesting a new template object (through an include, extends or any other plugin)
* an include, extends or any other plugin)
*
* @return ITemplate|null|false
Copy path View file
@@ -14,7 +14,7 @@
* @copyright 2013-2016 David Sanchez
* @license http://dwoo.org/LICENSE Modified BSD License
* @version Release: 1.2.4
* @date 2016-10-16
* @date 2016-10-17
* @link http://dwoo.org/
*/
class Loader implements ILoader
@@ -82,7 +82,8 @@ protected function rebuildClassPathCache($path, $cacheFile)
if (is_dir($f)) {
$this->rebuildClassPathCache($f, false);
} else {
$this->classPath[str_replace(array(
$this->classPath[str_replace(
array(
'function.',
'block.',
'modifier.',
@@ -95,7 +96,8 @@ protected function rebuildClassPathCache($path, $cacheFile)
'output.',
'shared.',
'helper.'
), '', basename($f, '.php'))] = $f;
), '', basename($f, '.php')
)] = $f;
}
}
}
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.