- version 3.6
Check those constraints:
$this->anything()
<?php | |
// model/Article.php | |
App::uses('AppModel', 'Model'); | |
class Article extends AppModel | |
{ | |
public $hasAndBelongsToMany = array( | |
'Category' => | |
array( |
<?php | |
class ArticlesController extends AppController | |
{ | |
public $components = array('Paginator'); | |
public function test() | |
{ | |
$this->Paginator->settings['Article'] = array( | |
'contain' => array('Category' => array( | |
'conditions' => array('Category.id' => 2) |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">02 RAMADAN - RAHMAT</h3> | |
</div> | |
<div class="panel-body"> | |
<h1>29 June 2014</h1> | |
<h2>(SUNDAY)</h2> | |
<h3 class="sehri">Sehri: 03:42 AM</h3> | |
<h3 class="iftar">IFTAR: 06:49 PM</h3> | |
</div> |
<?php | |
class MDC_IpManagerClass{ | |
public $MyIp = $_SERVER['REMOTE_ADDR']; | |
//................................................... | |
// more code snippet | |
//................................................... | |
} | |
/** | |
* Here $MyIp is just a class property declaration. It can't holds any EXPRESSION. |
$(document).ready(function(){ | |
var a = $('.navbar-nav a'); | |
a.each(function(){ | |
if(window.location.href == $(this).attr('href')){ | |
$(this).closest('li').addClass('active'); | |
} | |
}) | |
}) |
<?php | |
//@URL http://stackoverflow.com/questions/1268378/create-ini-file-write-values-in-php?answertab=votes#answer-1268642 | |
function write_ini_file($assoc_arr, $path, $has_sections = FALSE) | |
{ | |
$content = ""; | |
if ($has_sections) { | |
foreach ($assoc_arr as $key => $elem) { | |
$content .= "[" . $key . "]\n"; | |
foreach ($elem as $key2 => $elem2) { |
############### Vartual Host PIGI ORDER PORTAL (Accounts) ####################### | |
server { | |
listen 80; | |
server_name accounts.pop.dev; | |
root /var/www/pop/accounts/webroot/; | |
access_log /var/log/nginx/accounts-pop.access.log; | |
error_log /var/log/nginx/accounts-pop.error.log; | |
location / { |
location ~ \.php/?(.*)$ { | |
fastcgi_connect_timeout 3000s; # default of 60s is just too long | |
fastcgi_read_timeout 1000s; # default of 60s is just too long | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
<?php | |
$erp = new Erp(); | |
$getPartnersInvoice = $erp->search('account.invoice', array(array('partner_id', '=', 57), array('state', '=', 'open'))); | |
$getPartnersInvoiceDetails = $erp->read('account.invoice', array($getPartnersInvoice)); | |
//var_dump($getPartnersInvoiceDetails); die(); | |
$dataVoucher = array( | |
'journal_id' => (int)$getPartnersInvoiceDetails[0]['journal_id']['data']['value'][0]['int'], |