This file contains hidden or 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
var self = this; | |
$.each(this.filters, function(index, filter) { | |
filter.label = (self.labels[filter.field] && self.labels[filter.field][filter.value]) ? | |
self.labels[filter.field][filter.value] : | |
filter.value; | |
AjaxSolr.theme( | |
'activeFilterListItem', | |
filter, | |
function() { |
This file contains hidden or 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 = Mockery::mock('Doctrine\ORM\ClassMetadata'); | |
include '/mypath/doctrine/orm/lib/Doctrine/ORM/Query.php'; | |
?> | |
Now I get the following error message: | |
Fatal error: Cannot use Doctrine\ORM\Mapping\ClassMetadata as ClassMetadata because the name is already in use in Query.php on line 29 | |
This line contains a namespace import: |
This file contains hidden or 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
protected function validateLocalPart() | |
{ | |
// First try to match the local part on the common dot-atom format | |
$result = false; | |
// Dot-atom characters are: 1*atext *("." 1*atext) | |
// atext: ALPHA / DIGIT / and "!", "#", "$", "%", "&", "'", "*", | |
// "+", "-", "/", "=", "?", "^", "_", "`", "{", "|", "}", "~" | |
$atext = 'a-zA-Z0-9\x21\x23\x24\x25\x26\x27\x2a\x2b\x2d\x2f\x3d\x3f\x5e\x5f\x60\x7b\x7c\x7d\x7e'; | |
if (preg_match('/^[' . $atext . ']+(\x2e+[' . $atext . ']+)*$/', $this->localPart)) { |
This file contains hidden or 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 | |
/** | |
* BarTrait | |
* | |
* @category MyNamespace | |
* @package MyNamespace | |
* @copyright 2014 | |
* @version SVN: $Id$ | |
*/ |
This file contains hidden or 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 Module\Entity; | |
/** | |
* @ORM\Entity | |
*/ | |
class EntityA | |
{ | |
/** | |
* @ORM\ManyToOne(targetEntity="Module\Entity\EntityBInterface", fetch="LAZY") |
This file contains hidden or 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
Fatal error: Uncaught exception 'Doctrine\Common\Persistence\Mapping\MappingException' with message 'The class 'AcsiMarketingPackage\Entity\Package' was not found in the chain configured namespaces AcsiBase\Entity, AcsiDoctrine\Entity, AcsiI18n\Entity, AcsiCRM\Entity, AcsiMedia\Entity, AcsiGeo\Entity, AcsiCampsite\Entity, AcsiWebsite\Entity, AcsiCpc\Entity, AcsiCampsiteWeather\Entity, AcsiCampsiteReview\Entity, AcsiCampsiteInfoRequest\Entity, AcsiRedirect\Entity, AcsiMatch2Camp\Entity, AcsiPortal\Entity, AcsiAppCodeRedirect\Entity, AcsiCmsUser\Entity' in C:\www\campingcard\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\MappingException.php on line 37 | |
Doctrine\Common\Persistence\Mapping\MappingException: The class 'AcsiMarketingPackage\Entity\Package' was not found in the chain configured namespaces AcsiBase\Entity, AcsiDoctrine\Entity, AcsiI18n\Entity, AcsiCRM\Entity, AcsiMedia\Entity, AcsiGeo\Entity, AcsiCampsite\Entity, AcsiWebsite\Entity, AcsiCpc\Entity, AcsiCampsiteWeather\Entity, AcsiCam |
This file contains hidden or 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
$campsite = $campsiteRepo->find(100011); | |
$ranking = $campsite->getRanking(); | |
$ranking = $rankingRepo->findOneBy(['campsite' => 100011]); | |
$campsite = $ranking->getCampsite(); |
This file contains hidden or 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 MyResource extends AbstractResourceListener implements ResourceInterface | |
{ | |
public function fetch($id) | |
{ | |
$entity = $this->getEntityById($id, false); | |
if ($entity === null) { | |
return new ApiProblemResponse(new ApiProblem(404, 'Entity with ID ' . $id . ' not found')); | |
} | |
return $entity; |
This file contains hidden or 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
//Dit werkt wel | |
$('#js-searchresults-change-data').on('click', function() { | |
// Append a overlay for the form | |
$('#main').append('<div id="js-searchresults-form-overlay" class="searchresults-overlay searchresults-overlay--form"></div>'); | |
$('#js-searchresults-form, #js-searchresults-form-overlay').velocity('fadeIn', {duration: 300}); | |
}) | |
//Dit werkt niet | |
/*$(document).on('click', '#js-searchresults-change-data', function (event) { |
This file contains hidden or 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
Mockery::on(function($a, $b) { | |
$this->assertEquals('foo', $a); | |
return true; | |
}); |