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 | |
Route::redirect('/articoli/*', | |
'http://www.google.it', | |
array('status' => 302) | |
); |
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 | |
Router::redirect('/articoli/:id', | |
array( | |
'controller' => 'posts', | |
'action' => 'view' | |
), | |
array( | |
'status' => 302, | |
'persist' => array('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
<?php | |
Router::connect('/blog/articoli/:id', | |
array( | |
'controller' => 'posts', | |
'action' => 'view' | |
), | |
array( | |
'id' => '[0-9]+', | |
'pass' => array('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
<?php | |
echo $this->Html->link('Articolo 3', array('action' => 'posts', 'action' => 'view', 3, '?' => array('queryKey001' => 'queryValue001'), '#' => 'idAncora')); |
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 | |
$url = Router::url(array('controller' => 'posts', 'action' => 'view', 3)); |
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 | |
$this->redirect(array('controller' => 'posts', 'action' => 'view', 3)); |
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 echo $this->Html->link('Articolo 3', array('action' => 'posts', 'action' => 'view', 3 )); |
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 | |
Router::connect('/articoli/:id', | |
array( | |
'controller' => 'posts', | |
'action' => 'view' | |
), | |
array( | |
'id' => '[0-9]+', | |
'pass' => array('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
<?php | |
$this->Customtime->timeLeft(date('2014-12-15 18:20:15')); | |
# 'Oggi alle 18:20' | |
$this->Customtime->timeLeft(date('2014-12-18 15:20:15')); | |
# 'Tra 3 giorni alle 15:20' | |
$this->Customtime->timeLeft(date('2014-12-21 08:20:15')); | |
# 'Tra 6 giorni alle 08:20' |
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 | |
echo $this->Customtime->timeAgo(date('2014-12-15 15:20:15')); | |
# '1 ora fa' | |
echo $this->Customtime->timeAgo(date('2014-12-15 08:20:15')); | |
# 'Oggi alle 08:20' | |
echo $this->Customtime->timeAgo(date('2014-11-14 20:20:15')); | |
# '14 Novembre' |
NewerOlder