Skip to content

Instantly share code, notes, and snippets.

View odino's full-sized avatar
shipping!

Alessandro Nadalin odino

shipping!
View GitHub Profile
<?php if ($sf_user->hasFlash('notice')): ?>
<div class="flash_notice">
<?php echo __($sf_user->getFlash('notice')) ?>
</div>
<?php endif; ?>
odino@odino:/var/www/Symfony2/hello$ phpunit
PHPUnit 3.5.0RC2 by Sebastian Bergmann.
E
Time: 1 second, Memory: 4.25Mb
There was 1 error:
1) Application\HelloBundle\Tests\Controller\HelloControllerTest::testIndex
<?php
// inside a controller
// using POST
$object = new Object();
$object->fromArray($request->getPostParameters());
// using PUT
<?php
class myActions extends sfcAtions
{
public function executeForm(sfWebRequest$request
{
$this->form = new myForm(array(), array('myGet' => $request->getParameter('myGet')));
}
}
<?php
class myForm extends BaseForm
{
public function configure()
{
parent::configure();
$myGet = $this->getOption('myGet');
}
Array
(
[------------------------------87911417a8d7
Content-Disposition:_form-data;_name] => "name"
alexandre
------------------------------87911417a8d7--
)
class sfGuardUser extends PluginsfGuardUser
{
public function save(Doctrine_Connection $conn = null)
{
if (get_class($this) != 'sfGuardUser')
{
$name = $this->native_group;
$native_group = $this->getNativeGroup($name);
$this->link('Groups', $native_group->id);
}
<ul>
<li>Titolo</li>
<li>21 Ottobre 1900</li>
<li>Una descrizione del nostro prodotto più fico...</li>
</ul>
<ul>
<li>21 Ottobre 1900</li>
<tbody id="fileList">
<?php
$count = 1;
$css = "";
//list all documents (files and folders) under this current folder,
//<?php echo appendQueryString(appendQueryString(CONFIG_URL_FILEnIMAGE_MANAGER, "path=" . $file['path']), makeQueryString(array('path')));
foreach($fileList as $file)
{
$css = ($css == "" || $css == "even"?"odd":"even");
$strDisabled = ($file['is_writable']?"":" disabled");
######## php class
<?php
/**
* ENTRE_DESCRIPION
*
* @package ENTRE_PROJECT_NAME
* @subpackage ENTER_SUBPACKAGE
* @author Name Surname <email>