On Sat, 13 Jan 2007, Peter Keung wrote: > Modified: trunk/Base/docs/tutorial.txt > =================================================================== > --- trunk/Base/docs/tutorial.txt 2007-01-12 22:35:36 UTC (rev 4497) > +++ trunk/Base/docs/tutorial.txt 2007-01-12 23:07:17 UTC (rev 4498)
<snip> > @@ -30,39 +29,39 @@ > Usage > ===== > > -Adding class repositories located outside eZ components to autoload system > +Adding class repositories located outside eZ Components to autoload system > -------------------------------------------------------------------------- > > -It can be useful to add repositories of user defined classes to the eZ > -components autoload system. The ezcBase::addClassRepository() method can be > -used to perform this task. At you need to arrange the desired external > classes > -in a class repository, i.e. make sure that classes and correspondent > -\*_autoload.php files are named and placed accordingly to explanations below. > -After they are in the proper structure you can call addClassRepository() with > -the proper parameters somewhere in code before you use the external classes. > +It can be useful to add repositories of user-defined classes to the eZ > +Components autoload system. The ezcBase::addClassRepository() method can be > +used to perform this task. You need to arrange the desired external classes > +in a class repository. That is, make sure that classes and corresponding > +\*_autoload.php files are named and placed according to the explanations > below. > +After they are in the proper structure, you can call addClassRepository() > with > +the proper parameters before you use the external classes. > External classes will then be loaded by autoload system. > > ezcBase::addClassRepository() takes two arguments: > > - $basePath is the base path for the whole class repository. > -- $autoloadDirPath the path where autoload files for this repository are > found. > +- $autoloadDirPath is the path where autoload files for this repository are > found. > > The paths in the autoload files are *not* relative to the package directory > -as specified by the $basePath argument. I.e. class definition files will > -be searched for in the location $autoloadDirPath only. > +as specified by the $basePath argument. In other words, class definition > files will > +only be searched for in the location $autoloadDirPath. > > -Example: > -Take the following facts: > +Consider the following example: > > - There is a class repository stored in the directory "./repos". > -- Autoload files for that repository are stored in "./repos/autoloads". > +- Autoload files for this repository are stored in "./repos/autoloads". > - There are two components in this repository: "Me" and "You". > - The "Me" component has the classes "erMyClass1" and "erMyClass2". > - The "You" component has the classes "erYourClass1" and "erYourClass2". > > -In this case you need to create the following files in "./repos/autoloads". > -Please note that the part before _autoload.php in the filename is the first > -part of the classname, not considering the all lower-case letter prefix. > +In this case, you need to create the following files in "./repos/autoloads". > +Note that the prefix to _autoload.php in the filename is the first > +part of the classname (although its first letter is uppercase for the > +classname). This changes the meaning of the sentence. What it should say is that the "er" prefix that is shown in the 4th and 5th bullet point above is not part of the prefix to the _autoload.php file. In other words, the autoload file name is not er_my_autoload.php but just my_autoload.php regards, Derick -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components