This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Jobtool | |
{ | |
public function doFoo($arg1, $arg2) { | |
return array('foo' => 12); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Show all errors. | |
error_reporting(E_ALL); | |
class beers { | |
const softdrink = 'rootbeer'; | |
public static $ale = 'ipa'; | |
} | |
$rootbeer = 'A & W'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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"}) |