abdullahfaqeir / doophp Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/doophp
License: BSD 3-Clause "New" or "Revised" License
Automatically exported from code.google.com/p/doophp
License: BSD 3-Clause "New" or "Revised" License
There's a need for auto loading of the core classes in DooPHP, however
developers should be given the option to turn it on/off.
Developers can specify what classes(in protected/class) as well as Models
they want to be included in the autoload.
Eg.
// This turn on autoloading and core classes will be auto loaded
$config['AUTOLOAD'] = true;
// User can specify their classes they want to be included
// Class name = file name
// * loads all in the folder, however, there's a need to specify if model
is in a sub folder
$config['AUTOLOAD_CLASS'] = array(
'class'=>array('MyGDClass', 'Smarty'),
'model'=>'*'
)
Original issue reported on code.google.com by darkredz
on 4 Aug 2009 at 1:58
Needed a convenient tool for sitemap generator which help developers to
write routes. This will improve the KISS approach to beginners as well as
saving developers from writing routes manually.
Should be placed in app/tools
Original issue reported on code.google.com by darkredz
on 9 Aug 2009 at 7:56
After expanding and collapsing, say, Conf or Cookie tabs, they can no
longer be expanded.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2009 at 8:43
What steps will reproduce the problem?
1. setup a new doophp app
2. access http://localhost/index.php or where you place the project with the
index.php in the url
3. 404 not found will be shown
What is the expected output? What do you see instead?
Should display the same thing as http://localhost/
Original issue reported on code.google.com by darkredz
on 9 Jun 2010 at 4:10
We need a better modular system like Zend Framework
http://framework.zend.com/manual/en/zend.controller.modular.html
Where we can have same file names but different class names.
Original issue reported on code.google.com by darkredz
on 18 Aug 2009 at 8:13
The file header in /trunk/dooframework/session/DooSession.php is wrong
(copied from another file).
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 7:36
What steps will reproduce the problem?
1. generate sitemap and save to routes
What is the expected output? What do you see instead?
- expected: correct php syntax
- see: \' instead of '
What version of the product are you using? On what operating system?
- trunk rev40
- system: xampp1.7.1, php5.2.9, winxp
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2009 at 11:43
Attachments:
I've noticed what Richard has reported in
http://www.doophp.com/forum/viewtopic.php?f=7&t=159#p928:
"On line 64 of the DooSession.php file it requires
Zend/Session/Exception.php".
Filing issues here makes it easier to track problems and their fixes.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 7:45
What steps will reproduce the problem?
1. isValid() returns Boolean true/false
2. $this->_errors is a protected
there's no way to retrieve the errors array.
Original issue reported on code.google.com by darkredz
on 9 Dec 2009 at 4:16
Leng, I happen to look at rev. 64, in which the comment says that something
got fixed, but the code managing system says: "Contents and properties are
unchanged."
Just wanted to bring this to your attention in case the fix didn't make it.
Original issue reported on code.google.com by [email protected]
on 29 Aug 2009 at 4:55
IF statement needs to be supported in DooView.
However, developers are allowed to control what functions can be use in the
if & else if conditional statement such as isset() empty().
Functions that are not registered in template_tags should be filter out.
Original issue reported on code.google.com by darkredz
on 5 Aug 2009 at 7:06
Because session id can only be set prior to starting a session, and session
is started in the class constructor, having setId() as public doesn't make
sense.
Original issue reported on code.google.com by [email protected]
on 17 Sep 2009 at 3:40
When I click on a tab, I see the content displayed as raw HTML code. For
example,
<pre class='xdebug-var-dump' dir='ltr'>
<b>object</b>(<i>DooConfig</i>)[<i>1</i>]
<i>public</i> 'SITE_PATH' <font color='#888a85'>=></font>
<small>string</small> <font color='#cc0000'>'.'</font> <i>(length=1)</i>
<i>public</i> 'PROTECTED_FOLDER' <font color='#888a85'>=></font>
<small>string</small> <font color='#cc0000'>'protected/'</font>
<i>(length=10)</i>
....and so on.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2009 at 8:45
I've decided to make sure you remember about this :)
Something along the lines of
http://www.doophp.com/forum/viewtopic.php?f=7&t=148 (with whatever
improvements you and others can come up with).
Original issue reported on code.google.com by [email protected]
on 31 Aug 2009 at 5:32
There's a need of URI helper function to help generate URLs based on an ID.
It should be a static method which can be used in both Controller and View
(template tags).
Original issue reported on code.google.com by darkredz
on 4 Aug 2009 at 2:04
This issue is similar to issue 39.
What steps will reproduce the problem?
Given DooSmartModel subclasses A & B,
1. Doo::loadModel('A', true);
2. Doo::loadModel('B', true);
3. $a = A::getById_first(1);
What is the expected output? What do you see instead?
expected: $a is an instance of A
observed: $a is an instance of B
What version of the product are you using?
DooPHP SVN trunk r340
Please provide any additional information below.
Test app attached.
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 9:15
Attachments:
function namespaceUnset($name = null)
The default value is null, not empty string. Therefore, if ($name === '')
should be if($name == null). I'd just use empty() to cover both cases.
Original issue reported on code.google.com by [email protected]
on 14 Sep 2009 at 7:33
The way config paths are set in the demo app is problematic. See what I got
with the original code:
Array ( [SITE_PATH] => C:\Users\[user
name]\Documents\Dev\Web\Sites\DooPHPPlatform\trunk\svn\app\ [BASE_PATH] =>
C:\Users\[user
name]\Documents\Dev\Web\Sites\DooPHPPlatform\trunk\svn\dooframework\
[APP_MODE] => dev [SUBFOLDER] => /C:/Users/[user
name]/Documents/Dev/Web/Sites/DooPHPPlatform/trunk/svn/app/ [APP_URL] =>
http://localhost/C:/Users/[user
name]/Documents/Dev/Web/Sites/DooPHPPlatform/trunk/svn/app/ )
Note the faulty values of SUBFOLDER and APP_URL. And this breaks the
application.
I propose the following code to compute the value of SUBFOLDER in the demo app:
$config['SUBFOLDER'] = dirname($_SERVER['SCRIPT_NAME']).'/';
With this code, I get the following config values:
Array ( [SITE_PATH] => C:\Users\[user
name]\Documents\Dev\Web\Sites\DooPHPPlatform\trunk\svn\app\ [BASE_PATH] =>
C:\Users\[user
name]\Documents\Dev\Web\Sites\DooPHPPlatform\trunk\svn\dooframework\
[APP_MODE] => dev [SUBFOLDER] => /sites/DooPHPPlatform/trunk/svn/app/
[APP_URL] => http://localhost/sites/DooPHPPlatform/trunk/svn/app/ )
And the demo application works!
Original issue reported on code.google.com by [email protected]
on 31 Aug 2009 at 5:32
DooController private properties should be protected $_load and $_view so
that developers can extend and do more with DooController.
Add a render() method for shorthand purpose.
$this->render() as an alternative to $this->view()->render()
Original issue reported on code.google.com by darkredz
on 3 Aug 2009 at 4:27
The comments to the method say this: "if that variable doesnt exist returns
null". Yet, the following code doesn't do it:
if (!isset($_SESSION[$this->_namespace][$name]))
return $_SESSION[$this->_namespace];
Original issue reported on code.google.com by [email protected]
on 14 Sep 2009 at 7:41
I have the following routes:
$route['*']['/'] = array('MainController', 'index');
$route['*']['root']['/:city'] = array('MainController', 'testIndex');
$route['*']['root']['/:city/test'] = array('MainController', 'testSomestuff');
$route['*']['root']['/:city/specialstuff'] = array('MainController',
'specialstuff');
$route['*']['/error'] = array('ErrorController', 'index');
And some more that came with the sample code.
And here's what index.php/allurl of the sample app generates (look at the
the second entry:
Array
(
[1 *] => /
[2 *] => root
[3 *] => /error
[4 *] => /debug/:filename
[5 *] => /allurl
[6 *] => /gen_site
[7 *] => /gen_model
[8 post] => /gen_sitemap
[9 post] => /gen_sitemap_controller
)
Not only is there not all URLs listed, but the URL for the second entry is
http://localhost/mysite/index.phproot.
Original issue reported on code.google.com by [email protected]
on 14 Dec 2009 at 10:35
What steps will reproduce the problem?
1. enable matchall in route:
$route['*']['catchall']['/:page_id'] = array('FrontController', 'index');
2. request http://domain.com/a/b/c/?d=1&e=2
3. run var_dump($this->params);
What is the expected output? What do you see instead?
i wanna params to contain all variables.
What version of the product are you using? On what operating system?
latest svn checkout, r449.
please consider the patch i made to solve the issue, So I could still use your
system and not starting my own fork
Please provide any additional information below.
The problem is in DooUriRouter.php
Original issue reported on code.google.com by [email protected]
on 17 Jul 2010 at 12:16
Attachments:
What steps will reproduce the problem?
1. Create a "main" template
2. Add <!-- include '{{content}}' -->
3. create an file that should go with the content var, etc content_file.html in
app/protected/view
4. add $data['content'] = 'content_file' and render the main template from your
controller
What is the expected output? What do you see instead?
The included template is never rendered by itself, and a error message will be
similar to:
Warning: include(content_file.php): failed to open stream: No such file or
directory in
/Users/myusers/Projects/doo-1/app/protected/viewc/mainwindow.php on line 27
Warning:
include(): Failed opening 'content_file.php' for inclusion
(include_path='.:/usr/lib/php') in
/Users/myuser/Projects/doo-1/app/protected/viewc/mainwindow.php on line 27
But!
If <!-- include 'content_file' --> is used, the template gets compiled and you
can then change
back to {{content}} again, and the error message will be supressed. This might
not be so good if
the content template have to be regenerated though.
Ofc, the trouble lies in convertInclude in DooView, which just tells the
template to include the
var, and the include never checks if the file exists, or not.
What version of the product are you using? On what operating system?
Running on OSX snow lep, php 5.3 and doophp 1.2
Please provide any additional information below.
--
Original issue reported on code.google.com by [email protected]
on 17 May 2010 at 12:31
DooPHP needs a file caching feature.
Original issue reported on code.google.com by [email protected]
on 8 Aug 2009 at 5:59
There's no reason for them to be static. Moreover, one of them tries to
access $this.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 11:36
What steps will reproduce the problem?
1. use app to create cache files
2. call Doo::cache()->flushAll();
What is the expected output? What do you see instead?
expected: cache files deleted
observed: cache files not deleted
What version of the product are you using?
svn revision 407
Patch:
Index: cache/DooFileCache.php
===================================================================
--- cache/DooFileCache.php (revision 407)
+++ cache/DooFileCache.php (working copy)
@@ -162,8 +162,10 @@
$handle = opendir($this->_directory);
while(($file = readdir($handle)) !== false) {
- if (is_file($file))
- unlink($file);
+ if (is_file($this->_directory . $file))
+ unlink($this->_directory . $file);
+ else if (is_dir($this->_directory . $file) && substr($file, 0, 4)
== 'mdl_')
+ $this->flushAllIn($file);
}
return true;
}
Original issue reported on code.google.com by [email protected]
on 24 Apr 2010 at 10:01
What steps will reproduce the problem?
1. $this->render('filename',$data,true,true);
2. Uses dynamic insertion of files
3. Files are transferred as a variable, not compiled, as well as their changes
need to fix, forced compilation
What is the expected output? What do you see instead?
Error file not found, or see an old compiled version
What version of the product are you using? On what operating system?
Latest
Original issue reported on code.google.com by [email protected]
on 25 Jun 2010 at 8:10
Need a gen_pgsql() method to generate Models from tables in a PostgreSQL
database.
Original issue reported on code.google.com by darkredz
on 4 Aug 2009 at 5:54
I've noticed that in some classes (e.g. DooController, DooSqlMagic), some
methods are named according to camel case convention while others are named
using '_'. I'd like it very much to see a consistent naming style used
throughout the framework's code. This makes using any library easier.
Original issue reported on code.google.com by [email protected]
on 3 Sep 2009 at 5:15
Because I've gotten confused every time I've read the comment (there has
been long periods of time when I didn't look at it), I'd like to suggest
that "//framework use, must defined, user full absolute path and end with /
eg. /var/www/project/" be replaced with this:
"For framework use. Must be defined. Use full absolute paths and end them
with '/'"
Also note that neither full nor absolute path is required for at least,
SITE_PATH, because the following has worked for me: $config['SITE_PATH'] =
"./"; So, the comment had better be modified to make it accurate.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2009 at 9:00
What steps will reproduce the problem?
1. doovalidator
2. 'title' => array('maxlength',45)
3. content of title in UTF-8 (Запись во второй категории)
What is the expected output? What do you see instead?
Return validation error
What version of the product are you using? On what operating system?
latest from svn
Please provide any additional information below.
Site use charet utf-8, my national lang use 2byte over enl 1byte
from DooValidator
use mb_strlen ? if function not exists strlen(iconv('from','to',$value))
public function testMaxLength($value, $length=0, $msg=null){
if(strlen($value) > $length){
if($msg!==null) return $msg;
return "Input cannot be longer than the $length characters.";
}
}
Original issue reported on code.google.com by [email protected]
on 9 Jul 2010 at 11:00
Will getMemUsage() going to get used elsewhere in the class? If not, then
introducing it instead of the code that it replaced will only slow down the
execution.
If the function is to stay, then it would be nice if zohaib.hassan
corrected orthographical and grammatical mistakes in the comments for this
function to make them easier to understand.
Original issue reported on code.google.com by [email protected]
on 6 Dec 2009 at 10:30
What steps will reproduce the problem?
1. Have only one route defined: $route['put']['/'] =
array('MainController', 'index');
2. Pass a GET parameter to an app
What is the expected output? What do you see instead?
I see MainController's index method executed. I expected to see some
indication of the fact that the app isn't set up to handle GET requests.
What version of the product are you using? On what operating system?
v1.1 with probably r74 of DooUriRouter.php on Windows Vista SP1.
Please provide any additional information below.
Using Apache 2.2.11 running PHP 5.2.9 in CGI/FastCGI mode.
Original issue reported on code.google.com by [email protected]
on 30 Aug 2009 at 6:51
What steps will reproduce the problem?
1. Create a database with the attached SQL
2. Config the attached app for your server
3. Run the attached app, going to /one then /two
4. Receive the error shown in the attached screenshot
Basically:
1. Call relate('Rel') on a DooSmartModel subclass called One
2. Call relate('Rel') on a different DooSmartModel subclass called Two
3. receive the following PHP error:
Fatal error: TwoController::go() [<a
href='twocontroller.go'>twocontroller.go</a>]: The script
tried to execute a method or access a property of an incomplete object. Please
ensure that the
class definition "One" of the object you are trying to operate on was
loaded _before_
unserialize() gets called or provide a __autoload() function to load the class
definition in
/Users/zac/Sites/smart_model_bug/app/protected/controller/TwoController.php on
line 9
What is the expected output? What do you see instead?
Classes One and Two both relate to class Rel. Calling relate('Rel') on class
One should not effect
subsequent calls to relate('Rel') on class Two. I am seeing that calling
relate('Rel') gives an error
as though class One is involved, when it is not.
What version of the product are you using? On what operating system?
SVN Revision 217, Mac OS X 10.5.8
Original issue reported on code.google.com by [email protected]
on 22 Oct 2009 at 8:53
Attachments:
It should test for the opposite condition. It has probably been copied from
getId() method :)
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 11:38
Sometimes it is necessary to set session id, and because it can be set BEFORE
session starts, the constructor should either take an id as a parameter or it
shouldn't start the session. I think the former option is better.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 11:27
We need a shortcut method for rendering a view page in controller, like
$this->view()->reander('index').
Original issue reported on code.google.com by [email protected]
on 3 Aug 2009 at 4:24
What steps will reproduce the problem?
1. Enable "short_open_tags" in php.ini
2. Try to access one of the demos
What is the expected output? What do you see instead?
Expected to see a properly rendered compiled view, but because short
tags enabled I cannot use "<?xml" doctype in templates
Additional information:
Operating system: Ubuntu 8.10 32-bit
Web server: Apache 2.2.9
Browser type: Firefox/Chrome/IE
PHP version: 5.2.6
PHP mode: mod_php
DooPHP version: 1.0.0
Original issue reported on code.google.com by [email protected]
on 21 Jul 2009 at 9:28
What steps will reproduce the problem?
1. Create a table in some database like"test"
2. create a column named "test1"
3. use DooModelGen to generate the model "test"
What is the expected output? What do you see instead?
should be something like:
in file "test.php" function "getVRules()"
'test1"=>array(
array( 'maxlength', 1000 ),
array( 'notnull' ),
)
but it is:
'testarray(
array( 'maxlength', 1000 ),
array( 'notnull' ),
)
What version of the product are you using? On what operating system?
@version $Id: DooModelGen.php 1000 2009-07-7 18:27:22
on windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Sep 2009 at 8:53
renderLayout() is a new method and probably needs to get into the list of
reserved methods. Is this correct?
Original issue reported on code.google.com by [email protected]
on 15 Dec 2009 at 7:31
What steps will reproduce the problem?
1. use a database daemon listening on a non-default port
What is the expected output? What do you see instead?
expected: should have a way to connect
observed: SqlMagicException('Failed to open the DB connection')
What version of the product are you using?
svn 287
Please provide any additional information below.
patch attached that allows optional 7th dbconfig port argument
This of course raises the queston of other DSN variations, like using a socket,
but I'll leave that
to you folks to decide how to handle.
Original issue reported on code.google.com by [email protected]
on 21 Dec 2009 at 3:42
Attachments:
What is the harm in calling destroy() is the session has already been
destroyed. I don't a need to throw an exception in this case.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 11:31
I've created a small app adapted from a sample in the framework download
file. It worked until I passed a parameter in the URL. I stepped through
execution and saw that the value of controller_name was wrong. Does DooPHP
disallow the use of URL parameters?
Using version 1.1
Here's my routes:
$route['*']['/'] = array('MainController', 'index');
Original issue reported on code.google.com by [email protected]
on 28 Aug 2009 at 6:35
Needed a convenient tool for viewing logs and profiles. It should support
sorting and filtering for a less tedious way in debugging an application
Should be placed in app/tools
Original issue reported on code.google.com by darkredz
on 9 Aug 2009 at 7:58
The latest version of DooPHP gives me "ob_clean(): failed to delete buffer.
No buffer to delete" when Diagnostics code is invoked.
See file C:\Users\[my
profile]\Documents\Dev\Web\DooPHPFramework\dooframework\diagnostic\debug.php
+ Error on line 138
Original issue reported on code.google.com by [email protected]
on 19 Dec 2009 at 12:23
It refers to timeAsName, which is undeclared.
Original issue reported on code.google.com by [email protected]
on 9 Jan 2010 at 5:03
What steps will reproduce the problem?
Given DooSmartModel subclasses A & B,
1. $a = new A
2. new B
3. $a->update()
What is the expected output? What do you see instead?
expected: cache A purged
observed: cache A not purged, cache B purged
What version of the product are you using? On what operating system?
DooPHP SVN revision 277.
PHP 5.3.1 (cgi-fcgi) (built: Dec 11 2009 16:11:17)
Zend Engine v2.3.0
MacPorts 1.8.1
Mac OS X 10.6.2
Please provide any additional information below.
Test app attached.
Original issue reported on code.google.com by [email protected]
on 17 Dec 2009 at 12:07
Attachments:
What steps will reproduce the problem?
1. create 2 nested routes in routes.conf.php:
$route['get']['/users/:id/verify'] = array('AuthController', 'verify_user');
$route['get']['/users/:id/roles'] = array('UserRoleController', 'index');
2. attempt to load the 2nd route at http://mysite.com/users/1/roles
3. erroneously receive the response of the first route
What version of the product are you using?
SVN Revision 210
Fix attached as an svn diff patch file. The DooUriRouter currently only checks
the part of the URL
before the first colon indicating a parameter. The attached patch checks all
parts of the URI that
do not begin with a colon, continuing the loops as soon as it finds a mismatch.
Original issue reported on code.google.com by [email protected]
on 18 Oct 2009 at 4:27
Attachments:
protected function block_cache($params) {
if(preg_match('/\((.+)(([,][ ]*)([0-9]+))?\)/', $params, $matches)) {
$matches[1] = $this->strToStmt($matches[1]);
print_r($matches[1]);
if (count($matches) == 5) {
return "<?php if (!Doo::cache('front')->getPart({$matches[1]},
{$matches[4]})): ?>\n<?php Doo::cache('front')->start({$matches[1]}); ?>
XXXXXx";
} else {
return "<?php if (!Doo::cache('front')->getPart({$matches[1]})):
?>\n<?php Doo::cache('front')->start({$matches[1]}); ?>Not set";
}
}
return "<span style=\"color:#ff0000\">Invalid cache parameters
specified.</span>";
}
Original issue reported on code.google.com by [email protected]
on 11 Mar 2010 at 9:55
It says this:
/*
* Unset namespace or value in it
*
* @param string $name If name is provided it will unset some value in
session namespace if not it will unset session.
*/
First, it says that the method will unset *namespace* or value in it, but
then it says that will unset *session* if... This is confusing.
Also, commas should be used in appropriate places to make comprehending
text easier. So, a more correct version of the comment would be this:
If name is provided, the method will unset some value in session namespace.
If not, it will unset current namespace.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 8:00
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.