Closed tgreiser closed 11 years ago
Even worse - indeed the query builder as well as the underlying soap client suffers from several design flaws, but there is no time for refactoring atm. The good news: The whole thing is working quite well right now, but i had yet no chance to merge the ongoing dev branch into the public one. I am hopefully looking forward to do so in the next few days. I already began to prepare the backporting, but had been interrupted last week. Nevertheless -- thank you for your efforts of trying the whole thing out, i will definitively regard your patch when performing the merge. The plan for the next "release" between daily work is to provide 3 components to make life easier: Generic SOAP client, SOQL-Tokenizer, parser + query builder, and a sobject describe toolkit supporting form generation.
Best regards, Johannes
Hi,
i recently split the whole thing up into seperate modules, added composer support and backported the last recent state of develpment. It is still not considered stable at all, but for my needs it fits (though there is space for lots of improvements, hopefully i will get along in the near future).
Small docs may be found here: https://github.com/joshiausdemwald/CodemitteForceToolkitBundle
Sorrily you will have to imagine the programmatic instantiation of all required objects when not using a symfony 2 environment.
Meanwhile you will be probably more happy with these libraries:
https://packagist.org/packages/ddeboer/salesforce-client-bundle https://packagist.org/packages/ddeboer/salesforce-mapper-bundle
cheers!
Cheers,
FYI, I was able to integrate the old code into Symfony 1.4 quite easily by using this SplClassLoader implementation in my ProjectConfig.
https://gist.github.com/221634
Tim.
On Wed, Nov 21, 2012 at 7:33 AM, Johannes Heinen notifications@github.comwrote:
Hi,
i recently split the whole thing up into seperate modules, added composer support and backported the last recent state of develpment. It is still not considered stable at all, but for my needs it fits (though there is space for lots of improvements, hopefully i will get along in the near future).
Small docs may be found here: https://github.com/joshiausdemwald/CodemitteForceToolkitBundle
Sorrily you will have to imagine the programmatic instantiation of all required objects when not using a symfony 2 environment.
Meanwhile you will be probably more happy with these libraries:
https://packagist.org/packages/ddeboer/salesforce-client-bundle https://packagist.org/packages/ddeboer/salesforce-mapper-bundle
cheers!
— Reply to this email directly or view it on GitHubhttps://github.com/joshiausdemwald/Force.com-Toolkit-for-PHP-5.3/issues/1#issuecomment-10599023.
I had to made a few changes in order to get this running (my goal was to use QueryBuilder to escape the arguments for my queries).
Here is my diff: http://pastebin.com/B3CcTVTR
There seem to still be some inconsistencies related to queries (half the methods take parameters and half don't), but after these changes I was able to get this working:
use Codemitte\Sfdc\Soql\QueryString; use Codemitte\Sfdc\Soql\Builder\QueryBuilder; use Codemitte\Sfdc\Soql\Parser\QueryParser; use Codemitte\Sfdc\Soql\Renderer\QueryRenderer; use Codemitte\Sfdc\Soql\Type\TypeFactory; use Codemitte\Sfdc\Soap\Mapping\Base\login; use Codemitte\Sfdc\Soap\Client\Connection\SfdcConnection; use Codemitte\Sfdc\Soap\Client\EnterpriseClient;
class myTestQueryClass { public function query() { $credentials = new login(USERNAME, PASSWORD.SECURITY_TOKEN); // I provided this wsdl myself $con = new SfdcConnection($credentials, dirname(FILE).'/vendor/Force.com-Toolkit-for-PHP-5.3/enterprise.wsdl.xml'); $con->login(); $this->client = new EnterpriseClient($con); $parser = new QueryParser(); $tf = new TypeFactory(); $renderer = new QueryRenderer($tf); $qb = new QueryBuilder($this->client, $parser, $renderer); $response = $qb->query("SELECT Id, Email from Contact WHERE Email = :email AND FirstName = :firstName AND LastName = :lastName", array( 'email' => $email, 'firstName' => $first_name, 'lastName' => $last_name, )); } }
Tim.