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 | |
$app = new App(); | |
$app->post('/', function(ServerRequestInterface $request, ResponseInterface $response) { | |
//ERROR on functional test - Cannot modify header information - headers already sent by | |
$filename = filter_var($filename, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); | |
header('Content-Type: application/octet-stream'); | |
header('Content-Transfer-Encoding: binary'); | |
header("Content-Disposition: attachment; filename=\"$filename\""); |
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 | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use Slim\Container; | |
use Slim\App; | |
use Slim\Views\Twig; | |
use Psr\Http\Message\ServerRequestInterface; | |
use Psr\Http\Message\ResponseInterface; | |
use Wolfe\Loader\Kernel; |
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 | |
namespace Wolfe\Tests; | |
use PHPUnit_Framework_TestCase; | |
use Slim\App; | |
use Slim\Http\Environment; | |
use Slim\Http\Headers; | |
use Slim\Http\Request; | |
use Slim\Http\RequestBody; |
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 | |
namespace Test\Job\JobBundle\Form\Type; | |
use Test\Job\CompanyBundle\Form\Type\CompanyType; | |
use Test\CoreBundle\Form\Type\AddressType; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Test\Job\JobBundle\Form\Transformer\CompanyToIdTransformer; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; |
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 | |
namespace CoreBundle\Library; | |
use Doctrine\Common\DataFixtures\Executor\ORMExecutor; | |
use Doctrine\Common\DataFixtures\Loader; | |
use Doctrine\Common\DataFixtures\Purger\ORMPurger; | |
use Doctrine\ORM\Tools\SchemaTool; |
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
services: | |
job_bundle.listener.job_listener: | |
class: JobBundle\Listener\JobListener | |
tags: | |
- { name: doctrine.orm.entity_listener } | |
orm: | |
default_entity_manager: ~ | |
auto_generate_proxy_classes: "%kernel.debug%" | |
naming_strategy: doctrine.orm.naming_strategy.underscore |
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 | |
//Entity file | |
* @UniqueEntity(fields="email", message="Sorry, this email address is already in use.", groups={"registration"}) | |
//Form file | |
public function configureOptions(OptionsResolver $resolver) | |
{ |
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 | |
/** | |
* Extract lookup table information from a database to be used in a select field. | |
* For example, a page can be published, rejected, or pending... | |
* | |
*/ | |
namespace ICS\CoreBundle\Library; |
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
services: | |
organization_bundle.listener.logos: | |
class: Gedmo\Uploadable\UploadableListener | |
arguments: [@stof_doctrine_extensions.uploadable.mime_type_guesser] | |
calls: | |
- [setAnnotationReader, ['@annotation_reader']] | |
- [setDefaultFileInfoClass, ['%stof_doctrine_extensions.uploadable.default_file_info.class%']] | |
- [setDefaultPath, ['%logo_directory%']] |
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 | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
if ($options['required']) { | |
$placeholder = 'test'; | |
} else { | |
$placeholder = 'nope'; | |
} |