Skip to content
Browse files

Correction of all the snippets that had $ sign.

  • Loading branch information...
1 parent 2193fb5 commit b38a0bc4f94762ae39f4bd899c911afe071d2f5c @mpmont committed
View
6 calendar.sublime-snippet
@@ -1,15 +1,15 @@
<snippet>
<content><![CDATA[
-$this->load->library('calendar');
+\$this->load->library('calendar');
-$data = array(
+\$data = array(
3 => 'http://example.com/news/article/2006/03/',
7 => 'http://example.com/news/article/2006/07/',
13 => 'http://example.com/news/article/2006/13/',
26 => 'http://example.com/news/article/2006/26/'
);
-echo $this->calendar->generate(2006, 6, $data);
+echo \$this->calendar->generate(2006, 6, $data);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>calendar</tabTrigger>
View
4 cart_add.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[
-$data = array(
+\$data = array(
'id' => 'sku_123ABC',
'qty' => 1,
'price' => 39.95,
@@ -8,7 +8,7 @@ $data = array(
'options' => array('Size' => 'L', 'Color' => 'Red')
);
-$this->cart->insert($data);
+\$this->cart->insert($data);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cart_add</tabTrigger>
View
4 cart_update.sublime-snippet
@@ -1,11 +1,11 @@
<snippet>
<content><![CDATA[
-$data = array(
+\$data = array(
'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
'qty' => 3
);
-$this->cart->update($data);
+\$this->cart->update($data);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cart_update</tabTrigger>
View
22 display_cart.sublime-snippet
@@ -13,21 +13,21 @@
<?php $i = 1; ?>
-<?php foreach ($this->cart->contents() as $items): ?>
+<?php foreach (\$this->cart->contents() as \$items): ?>
- <?php echo form_hidden($i.'[rowid]', $items['rowid']); ?>
+ <?php echo form_hidden(\$i.'[rowid]', \$items['rowid']); ?>
<tr>
- <td><?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td>
+ <td><?php echo form_input(array('name' => \$i.'[qty]', 'value' => \$items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td>
<td>
- <?php echo $items['name']; ?>
+ <?php echo \$items['name']; ?>
- <?php if ($this->cart->has_options($items['rowid']) == TRUE): ?>
+ <?php if (\$this->cart->has_options(\$items['rowid']) == TRUE): ?>
<p>
- <?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?>
+ <?php foreach (\$this->cart->product_options(\$items['rowid']) as \$option_name => \$option_value): ?>
- <strong><?php echo $option_name; ?>:</strong> <?php echo $option_value; ?><br />
+ <strong><?php echo \$option_name; ?>:</strong> <?php echo \$option_value; ?><br />
<?php endforeach; ?>
</p>
@@ -35,18 +35,18 @@
<?php endif; ?>
</td>
- <td style="text-align:right"><?php echo $this->cart->format_number($items['price']); ?></td>
- <td style="text-align:right">$<?php echo $this->cart->format_number($items['subtotal']); ?></td>
+ <td style="text-align:right"><?php echo \$this->cart->format_number(\$items['price']); ?></td>
+ <td style="text-align:right">$<?php echo \$this->cart->format_number(\$items['subtotal']); ?></td>
</tr>
-<?php $i++; ?>
+<?php \$i++; ?>
<?php endforeach; ?>
<tr>
<td colspan="2"> </td>
<td class="right"><strong>Total</strong></td>
- <td class="right">$<?php echo $this->cart->format_number($this->cart->total()); ?></td>
+ <td class="right">$<?php echo \$this->cart->format_number(\$this->cart->total()); ?></td>
</tr>
</table>
View
18 email.sublime-snippet
@@ -1,18 +1,18 @@
<snippet>
<content><![CDATA[
-$this->load->library('email');
+\$this->load->library('email');
-$this->email->from('your@example.com', 'Your Name');
-$this->email->to('someone@example.com');
-$this->email->cc('another@another-example.com');
-$this->email->bcc('them@their-example.com');
+\$this->email->from('your@example.com', 'Your Name');
+\$this->email->to('someone@example.com');
+\$this->email->cc('another@another-example.com');
+\$this->email->bcc('them@their-example.com');
-$this->email->subject('Email Test');
-$this->email->message('Testing the email class.');
+\$this->email->subject('Email Test');
+\$this->email->message('Testing the email class.');
-$this->email->send();
+\$this->email->send();
-echo $this->email->print_debugger();
+echo \$this->email->print_debugger();
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>email</tabTrigger>
View
2 form_validation.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[
-$this->form_validation->set_rules('fieldname', 'fieldlabel', 'trim|required|min_length[5]|max_length[12]|xss_clean');
+\$this->form_validation->set_rules('fieldname', 'fieldlabel', 'trim|required|min_length[5]|max_length[12]|xss_clean');
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>form_validation</tabTrigger>
View
6 generate_table.sublime-snippet
@@ -1,15 +1,15 @@
<snippet>
<content><![CDATA[
-$this->load->library('table');
+\$this->load->library('table');
-$data = array(
+\$data = array(
array('Name', 'Color', 'Size'),
array('Fred', 'Blue', 'Small'),
array('Mary', 'Red', 'Large'),
array('John', 'Green', 'Medium')
);
-echo $this->table->generate($data);
+echo \$this->table->generate($data);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>generate_table</tabTrigger>
View
48 pagination.sublime-snippet
@@ -1,32 +1,32 @@
<snippet>
<content><![CDATA[
-$this->load->library('pagination');
+\$this->load->library('pagination');
-$config['base_url'] = 'http://example.com/index.php/test/page/';
-$config['total_rows'] = 200;
-$config['per_page'] = 20;
-$config['uri_segment'] = 3;
-$config['num_links'] = 4;
-$config['full_tag_open'] = '<p>';
-$config['full_tag_close'] = '</p>';
-$config['first_link'] = 'First';
-$config['first_tag_open'] = '<div>';
-$config['first_tag_close'] = '</div>';
-$config['last_link'] = 'Last';
-$config['last_tag_open'] = '<div>';
-$config['last_tag_close'] = '</div>';
-$config['next_link'] = '&gt;';
-$config['next_tag_open'] = '<div>';
-$config['next_tag_close'] = '</div>';
-$config['prev_link'] = '&lt;';
-$config['prev_tag_open'] = '<div>';
-$config['prev_tag_close'] = '</div>';
-$config['cur_tag_open'] = '<b>';
-$config['cur_tag_close'] = '</b>';
+\$config['base_url'] = 'http://example.com/index.php/test/page/';
+\$config['total_rows'] = 200;
+\$config['per_page'] = 20;
+\$config['uri_segment'] = 3;
+\$config['num_links'] = 4;
+\$config['full_tag_open'] = '<p>';
+\$config['full_tag_close'] = '</p>';
+\$config['first_link'] = 'First';
+\$config['first_tag_open'] = '<div>';
+\$config['first_tag_close'] = '</div>';
+\$config['last_link'] = 'Last';
+\$config['last_tag_open'] = '<div>';
+\$config['last_tag_close'] = '</div>';
+\$config['next_link'] = '&gt;';
+\$config['next_tag_open'] = '<div>';
+\$config['next_tag_close'] = '</div>';
+\$config['prev_link'] = '&lt;';
+\$config['prev_tag_open'] = '<div>';
+\$config['prev_tag_close'] = '</div>';
+\$config['cur_tag_open'] = '<b>';
+\$config['cur_tag_close'] = '</b>';
-$this->pagination->initialize($config);
+\$this->pagination->initialize($config);
-echo $this->pagination->create_links();
+echo \$this->pagination->create_links();
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>pagination</tabTrigger>
View
18 upload.sublime-snippet
@@ -1,18 +1,18 @@
<snippet>
<content><![CDATA[
-$config['upload_path'] = './uploads/';
-$config['allowed_types'] = 'gif|jpg|png';
-$config['max_size'] = '100';
-$config['max_width'] = '1024';
-$config['max_height'] = '768';
+\$config['upload_path'] = './uploads/';
+\$config['allowed_types'] = 'gif|jpg|png';
+\$config['max_size'] = '100';
+\$config['max_width'] = '1024';
+\$config['max_height'] = '768';
-$this->load->library('upload', $config);
+\$this->load->library('upload', $config);
-if ( ! $this->upload->do_upload()){
- $error = array('error' => $this->upload->display_errors());
+if ( ! \$this->upload->do_upload()){
+ \$error = array('error' => \$this->upload->display_errors());
}
else{
- $data = array('upload_data' => $this->upload->data());
+ \$data = array('upload_data' => \$this->upload->data());
echo "success";
}
]]></content>

0 comments on commit b38a0bc

Please sign in to comment.
Something went wrong with that request. Please try again.