Skip to content

Instantly share code, notes, and snippets.

class Jobtool
{
public function doFoo($arg1, $arg2) {
return array('foo' => 12);
}
}
class SoapController extends Zend_Controller_Action
{
public function indexAction()
{
// disable the view and the layout of this action, as the soap
// server will handle all output
$this->_helper->layout->disableLayout();
$this->getHelper('viewRenderer')->setNoRender();
// create new soap server in `wsdl` mode
<?php
// Show all errors.
error_reporting(E_ALL);
class beers {
const softdrink = 'rootbeer';
public static $ale = 'ipa';
}
$rootbeer = 'A & W';
# Basic text search with relevancy for MongoDB.
# See http://blog.tty.nl/2010/02/08/simple-ranked-text-search-for-mongodb/
# Copythingie 2010 - Ward Bekker - [email protected]
#create (or empty) a docs collection
doc_col = MongoMapper.connection.db('example_db').collection('docs')
doc_col.remove({})
#add some sample data
doc_col.insert({ "txt" => "it is what it is"})