~registry/clubdistro/anoochit-clubdistro

« back to all changes in this revision

Viewing changes to concrete5-5.2ubuntu1/concrete5.2.0RC2/concrete/startup/autoload.php

  • Committer: Anuchit Chalothorn
  • Date: 2009-01-19 08:26:13 UTC
  • Revision ID: anoochit@gmail.com-20090119082613-jyxv9tam9ktfa73t
add concrete5 package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php 
 
2
 
 
3
function __autoload($class) {
 
4
        $txt = Loader::helper('text');
 
5
        if (strpos($class, 'BlockController') > 0) {
 
6
                $class = substr($class, 0, strpos($class, 'BlockController'));
 
7
                $handle = $txt->uncamelcase($class);
 
8
                Loader::block($handle);
 
9
        } else if (strpos($class, 'Helper') > 0) {
 
10
                $class = substr($class, 0, strpos($class, 'Helper'));
 
11
                $handle = $txt->uncamelcase($class);
 
12
                Loader::helper($handle);
 
13
        }
 
14
}
 
 
b'\\ No newline at end of file'