-
23 Jun 2011 9:53 AM #61
And thank you for your excellent work!
ExtJS 3.4, WAMP Apache 2.2.17, PHP 5.3.5, MySQL 5.5.8
-
23 Jun 2011 10:11 PM #62
Birthday gift
Birthday gift
Wouldn't it be nice if this code would have it's own website where all the documentation could be organised.
-
30 Jun 2011 9:37 AM #63
+1 !
a simple bitbucket/github whatever site would come in handy with no cost involved.
I think I will never understand why people prefer to spend hours diggin' in a forum and going back and forth to collect and build up their own, subjective little documentation (which differs avg. 25% from those made by others ..)
-
29 Jul 2011 11:50 AM #64
php integration not working with extjs4.0
php integration not working with extjs4.0
Hello, i downloaded ExtDirect.zip and unzipped it into my folder. While I don't get any errors on the Developer Web Inspector window in my browser (Safari, Chrome). The results from the date function is not being displayed. What is the next step? What is the next step? Where should I look? do I need to open additional ports (other then 80) in my firewall?
-
4 Aug 2011 9:29 PM #65
-
20 Aug 2011 12:32 PM #66
Does not work with ExtJS 4. Here is an updated version of example.html:
And here is an error log from Chrome console:HTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Ext.Direct Example</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.2a/ext.js"></script> <script type="text/javascript" src="example.php?javascript"></script> <script type="text/javascript"> Ext.onReady( function() { Ext.php.Server.date( 'Y-m-d', function(result){ alert( 'Server date is ' + result ); } ); } ); </script> </head> <body> <h1>Ext.Direct Example</h1> </body> </html>
Code:example.html:4 Uncaught TypeError: Cannot call method 'addProvider' of undefined example.html:13 Uncaught TypeError: Cannot call method 'date' of undefined
-
21 Aug 2011 3:25 AM #67
Hi, Blob,
If you use ext-all.js instead of ext.js, it works.
If you want to use ext.js, then you need to require the Ext.direct.Manager class:Code:http://extjs.cachefly.net/ext-4.0.2a/ext-all.js
This line of code must be before the Direct API is loaded, like this:Code:Ext.syncRequire( 'Ext.direct.Manager' );
I have already updated ExtDirect.php by changing the ExtDirect class. I have not published this new version yet, because there are a few other modifications. The change is in the beginning of the "get_javascript_api" method:Code:<script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.2a/ext.js"></script> <script type="text/javascript">Ext.syncRequire( 'Ext.direct.Manager' );</script> <script type="text/javascript" src="example.php?javascript"></script>
This is backwards compatible and does the job of requiring Ext.direct.Manager in ExtJS 4.PHP Code:/**
* @return string JSON encoded array containing the full API declaration
*/
static public function get_api_javascript()
{
$template = <<<JAVASCRIPT
if ( Ext.syncRequire )
Ext.syncRequire( 'Ext.direct.Manager' );
Ext.namespace( '[%namespace%]' );
[%descriptor%] = [%actions%];
Ext.Direct.addProvider( [%descriptor%] );
JAVASCRIPT;
-
4 Nov 2011 3:36 AM #68
Implement in custom frame
Implement in custom frame
hi all,
I try to implement this nice class with our framework but I need always a parameter in de registered class.
I mean this:
It results in the follow errorPHP Code:<?php
require 'ExtDirect.php';
class Server
{
function construct__(frame $frame){
$this->_frame = $frame;
}
public function date( $format )
{
return date( $format );
}
}
ExtDirect::provide( 'Server' );
?>
I try to change some things but I am stuck, maybe someone could give me some useful tips?PHP Code:Warning: Missing argument 1 for TestClient::__construct(), called in ExtDirect.php on line 501
Thanks,
Freez
-
6 Nov 2011 2:44 AM #69
Hi, Freez,
The easiest workaround would be to provide a default value for the constructor parameter:
PHP Code:<?php
require 'ExtDirect.php';
class Server
{
function construct__(frame $frame = 'default'){
$this->_frame = $frame;
}
public function date( $format )
{
return date( $format );
}
}
ExtDirect::provide( 'Server' );
?>
In fact, this ExtDirect implementation does not send parameters to the class constructor. The only exception is when ExtDirect::$constructor_send_params config is set to true. But, in this case, the action parameters (coming from the client-side) are sent to the class constructor.
Anyway, I am open to suggestions on how to provide parameters to the constructor from the server-side... What do you think? Should a new configuration option be created for this? Something like ExtDirect::$constructor_params ? How would it work?
Maybe like this:
What do you think?PHP Code:<?php
require 'ExtDirect.php';
class Server
{
function construct__(frame $frame){
$this->_frame = $frame;
}
public function date( $format )
{
return date( $format );
}
}
$params = array( 'this is the value for "frame" parameter' );
ExtDirect::$constructor_params = array( 'Server' => $params );
ExtDirect::provide( 'Server' );
?>
-
6 Nov 2011 11:00 PM #70
Would be great!
Would be great!
Hello!
That sounds very good
! Now I has make a little hack but it always send the constructor parameter.
If you would implement this you are brilliant!
Thanks,PHP Code:
$params = array( 'this is the value for "frame" parameter' );
ExtDirect::$constructor_params = array( 'Server' => $params );
Freez
Similar Threads
-
Ext.Direct PHP backend
By ckr in forum Ext.DirectReplies: 34Last Post: 11 Jun 2012, 1:30 PM -
Alternative Ext Direct PHP Implementation
By TommyMaintz in forum Ext.DirectReplies: 36Last Post: 26 Sep 2011, 12:08 AM -
Easy Ext.Direct integration with PHP
By j.bruni in forum Ext.DirectReplies: 2Last Post: 23 Jun 2010, 11:27 AM -
Simple Ext.Direct PHP apps
By pkristiana in forum Community DiscussionReplies: 1Last Post: 11 Feb 2010, 1:12 AM



Reply With Quote