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
$application = $event->getTarget(); | |
$application->getEventManager()->attach( | |
MvcEvent::EVENT_ROUTE, | |
function (MvcEvent $event) { | |
/* @var $route Route\PageRoute */ | |
$route = $event | |
->getApplication() | |
->getServiceManager() | |
->get(__NAMESPACE__ . '\Route\PageRoute'); |
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
/** | |
* Magic getter to expose protected properties. | |
* | |
* @param string $property | |
* @return mixed | |
*/ | |
public function __get($property) { | |
return $this->{'get'.ucfirst($property)}(); | |
} |
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
// strip table tag | |
$doc = new \DOMDocument(); | |
$doc->loadHTML($text); | |
$xpath = new \DOMXPath($doc); | |
foreach ($xpath->query('//table') as $node) { | |
$node->parentNode->removeChild($node); | |
} | |
$textWithoutTable = $doc->saveHTML(); | |
// controlla che ci siano almeno X paragrafi |
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 | |
$job = $this->_jobManager->get('Toms\Job\VisitJob'); | |
$this->_queue->push($job); |
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 | |
function printOdds() { | |
$i = 0; | |
while ($i <= 100) { | |
if ($i % 2 != 0) { | |
echo $i . " "; | |
} | |
$i++; | |
} |
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
$('.bs-sidebar').affix({ | |
offset: { | |
top: $('.bs-sidebar').offset().top, | |
bottom: function () { | |
return (this.bottom = $('body > footer').outerHeight(true) + 50) | |
} | |
} | |
}); |
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
SELECT DISTINCT t1.sess | |
FROM ( | |
wp_cf7groups AS t1 | |
INNER JOIN wp_cf7dbplugin_submits AS t2 ON ( t1.cf1 = t2.submit_time | |
OR t1.cf2 = t2.submit_time ) | |
) | |
WHERE t2.form_name | |
IN ( | |
'Azienda1', 'Azienda2' | |
) |
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 Tile extends Entity { | |
/** | |
* @ORM\OneToOne( | |
* targetEntity="Domino\Entity\Tile", | |
* mappedBy="tileLeft", | |
* cascade={"persist", "merge"} | |
* ) | |
* @var Tile | |
*/ |
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
object(Zend\Http\Response)[1337] | |
protected 'recommendedReasonPhrases' => | |
array (size=57) | |
100 => string 'Continue' (length=8) | |
101 => string 'Switching Protocols' (length=19) | |
102 => string 'Processing' (length=10) | |
200 => string 'OK' (length=2) | |
201 => string 'Created' (length=7) | |
202 => string 'Accepted' (length=8) | |
203 => string 'Non-Authoritative Information' (length=29) |
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 | |
$cars = [ | |
[ | |
'engine' => 'gasoline', | |
'doors' => 3, | |
'color' => 'red', | |
'cc' => '1200', | |
'release' => '2016', | |
], |
OlderNewer