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
duke@webmaker ~/tmp/c $ git --version | |
git version 1.8.2 | |
duke@webmaker ~/tmp/c $ ll | |
total 80K | |
drwxr-xr-x 3 duke duke 4.0K Apr 4 17:13 . | |
drwxrwxrwt 23 root root 64K Apr 4 17:17 .. | |
-rw-r--r-- 1 duke duke 3 Apr 4 16:43 a | |
drwxr-xr-x 7 duke duke 4.0K Apr 4 17:20 .git | |
duke@webmaker ~/tmp/c $ rm -r .git/ | |
rm: remove all arguments recursively? y |
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
$ time composer require --no-update | |
Search for a package []: symfony/symfony | |
Found 44 packages matching symfony/symfony | |
[0] symfony/symfony 2.0.7 | |
[1] symfony/symfony v2.0.10 | |
[2] symfony/symfony v2.0.11 | |
[3] symfony/symfony v2.0.12 | |
[4] symfony/symfony v2.0.13 |
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 | |
ini_set('display_errors', 1); | |
chdir(dirname(__DIR__)); | |
require 'init_autoloader.php'; | |
$container = new \Zend\Session\Container('name1'); | |
var_dump($container->offsetGet('f')); | |
$container->offsetSet('f', 'val'); | |
var_dump(session_id()); |
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
Linux webmaker 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux | |
PHP 5.4.14-1~precise+1 (cli) (built: Apr 11 2013 17:09:50) | |
Copyright (c) 1997-2013 The PHP Group | |
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies | |
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans | |
git: 01527ba [Thu Apr 25 14:28:04 2013 -0500] (HEAD, origin/develop) Fix navigation menu helper tests <Matthew Weier O'Phinney> | |
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 Site | |
* @ORM\Entity | |
* @ORM\Table(name="ad_posting_site", | |
* uniqueConstraints={@ORM\UniqueConstraint(name="display_name", columns={"display_name"})} | |
* ) | |
*/ | |
class Site extends AbstractEntityParams |
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 onBootstrap(MvcEvent $e) | |
{ | |
$sharedManager = $e->getApplication()->getEventManager()->getSharedManager(); | |
$sharedManager->attach('LibraArticle\Controller\ArticleController', 'dispatch', function($e) { | |
// Add current article to layout | |
$controller = $e->getTarget(); | |
$controller->getEventManager()->attach('view', function($e) { | |
$article = $e->getParam('article'); | |
$controller = $e->getTarget(); |
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 | |
/** | |
* Example action | |
* This is an example action that tests binding of forms to entities. | |
* @return \Zend\View\Model\ViewModel | |
*/ | |
public function exampleAction() | |
{ | |
$node = new \ArrayObject(array( |
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
return array( | |
'di' => array( | |
'instance' => array( | |
'Zend\View\Resolver\AggregateResolver' => array( | |
'injections' => array( | |
'Zend\View\Resolver\TemplateMapResolver', | |
'Zend\View\Resolver\TemplatePathStack', | |
'Zend\View\Resolver\RelativeFallbackResolver', | |
'Zend\View\Resolver\RelativeFallbackResolver2', | |
), |
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
{"myAdEntries":[{"id":"1034716359","date":1416747378000,"url":"/v-view-details.html?adId=1034716359","active":true,"title":"POST RENOVATION, POST CONSTRUCTION CLEANING : 289-644-9139","price":"","locationName":"Toronto (GTA) > Oakville / Halton Region","expired":false,"promoting":false,"expirationDate":1421931378000,"pageNumber":"1","viewCounter":0,"delayed":false,"teaserUrl":"//secureimg.ebayimg.com/00/s/MTgzWDE0MA==/z/I28AAOSwd4tTuuut/$_2.JPG","canEditPrice":false,"showExpirationDate":false,"showViewCounter":true,"showPageNumber":true,"canConfirm":false,"canEdit":true,"canRepost":false,"canDelete":true,"expiring":false,"repostSurveyReasons":[{"messageKey":"my.ads.survey.notEnoughResponses","name":"NOT_ENOUGH_RESPONSES","other":false,"preferNotToSay":false},{"messageKey":"my.ads.survey.simlarActivityOrEventToPromote","name":"SIMLAR_ACTIVITY_OR_EVENT_TO_PROMOTE","other":false,"preferNotToSay":false},{"messageKey":"my.ads.survey.preferNotToSay","name":"PREFER_NOT_TO_SAY","other":false,"preferNotToSay":true}]," |
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 | |
/* Setup page vars for display. */ | |
if ($page == 0) $page = 1; //if no page var is given, default to 1. | |
$prev = $page - 1; //previous page is page - 1 | |
$next = $page + 1; //next page is page + 1 | |
$lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up. | |
$lpm1 = $lastpage - 1; //last page minus 1 | |
/* | |
Now we apply our rules and draw the pagination object. | |
We're actually saving the code to a variable in case we want to draw it more than once. |
OlderNewer