View gist:549660
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 | |
/** | |
* healthstate actions. | |
* | |
* @package ordinativi | |
* @subpackage healthstate | |
* @author KEY5 | |
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ |
View gist:595620
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 | |
class frontendConfiguration extends sfApplicationConfiguration | |
{ | |
protected $requestFormat = null; | |
public function configure() | |
{ | |
$this->dispatcher->connect('request.filter_parameters', array($this, 'filterRequestParameters')); |
View actions.class.php
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 | |
class itemActions extends sfActions | |
{ | |
/** | |
* @param sfRequest $request | |
*/ | |
public function executeIndex(sfWebRequest $request) | |
{ | |
$this->form = new ItemForm(); |
View schema_doctrine.yml
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
Item: | |
columns: | |
name: { type: string(255), notnull: true } | |
address: { type: string(255), notnull: true } | |
city: { type: string(255), notnull: true } | |
latitude: { type: decimal, scale: 6, size: 10, notnull: true } | |
longitude: { type: decimal, scale: 6, size: 10, notnull: true } |
View schema_propel.yml
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
classes: | |
Item: | |
columns: | |
id: ~ | |
name: { type: varchar, required: true } | |
address: { type: varchar, required: true } | |
city: { type: varchar, required: true } | |
latitude: { type: decimal, scale: 6, size: 10, required: true } | |
longitude: { type: decimal, scale: 6, size: 10, required: true } |
View model_doctrine.php
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 | |
// lib/model/doctrine/ItemTable.php | |
class ItemTable extends Doctrine_Table | |
{ | |
/** | |
* @param array $values | |
* @param integer $limit | |
* @return Doctrine_Collection |
View model_propel.php
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 | |
// lib/model/ItemQuery.php | |
class ItemQuery extends BaseItemQuery | |
{ | |
/** | |
* @param array $values | |
* @param integer $limit | |
* @return PropelCollection |
View locator.js
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
$().ready(function() { | |
// search address and get latitude/longitude | |
var searchLocations = function(e) { | |
var $form = $(this); | |
var address = $('input#address').val(); | |
var geocoder = new google.maps.Geocoder(); | |
geocoder.geocode({address: address}, function(results, status) { | |
if (status === google.maps.GeocoderStatus.OK) { | |
var center = results[0].geometry.location; |
View strtotime.php
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 | |
// tried this today, 31 May 2011 | |
echo "\n"; | |
echo date('Y-m-d', strtotime('first day of next month')); // correct | |
echo "\n"; | |
echo date('Y-m-d', strtotime('+1 month')); // wrong! output is 2011-07-01 | |
echo "\n"; |
View gist:1583690
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
/** | |
* @Route("/search/prova") | |
* @Template() | |
* @return array | |
*/ | |
public function provaAction() | |
{ | |
$form = $this->createFormBuilder() | |
->add('type', 'choice', array('required' => false, 'choices' => array( | |
'' => '', |
OlderNewer