[Owncloud] Advanced Apptemplate
Bernhard Posselt
nukeawhale at gmail.com
Thu Nov 29 11:20:20 UTC 2012
Basically you should prepend it every time. The problem is, that if you
write: namespace \Your\NameSpace; at the top of your file, OCP\Util will
become \Your\NameSpace\OCP\Util and that will ofc fail to look up the
correct class.
Think of it as an absolute path when you prepend the \
Without it, its relative.
For the _ I have no idea, would be interested myself :)
On 11/29/2012 10:40 AM, Arman Khalatyan wrote:
> WOW!! Cool Thanks a lot!!! Very nice tutorial.
> A few comments:
> I am always confused in the OC sourcecode somewhere is used
> \OCP\Util::, \OC_DB, \OC_App and \OCP\App::
> When one need to use "\" or " _" ???
>
> Thanks,
> Arman.
>
>
> On Wed, Nov 28, 2012 at 5:06 PM, Bernhard Posselt <nukeawhale at gmail.com> wrote:
>> I recently took over the maintainership for the apptemplate app.
>> Following Franks and DeepDiver's advice to move more complex stuff into
>> a seperate app, I've created an app called apptemplate_advanced:
>> https://github.com/owncloud/apps/tree/master/apptemplate_advanced
>>
>> This template uses routes, controllers, unittests and dependency
>> injection. Im planning to also introduce some basic stuff for angularjs
>> and coffeescript in the long run.
>>
>> For the database access i want to wait until we use Doctrine to add some
>> ORM entities and examples in the code on how to use them. If someone
>> would still want to contribute some best practice php, youre welcome!
>>
>> Everything is documented on
>> http://doc.owncloud.com/server/5.0/developer_manual/tutorial.html and im
>> constantly improving the docs.
>>
>> If you want to help or simply improve things/show up problems, please
>> let me know. Feedback appreciated!
>> _______________________________________________
>> Owncloud mailing list
>> Owncloud at kde.org
>> https://mail.kde.org/mailman/listinfo/owncloud
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
More information about the Owncloud
mailing list