what is import?

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 4
Joined: Fri Aug 19, 2011 11:46 pm

what is import?

Postby tingle » Fri Aug 19, 2011 11:59 pm


"import('path.to.some.class')" is used 1,467 time in the OJS PHP files.

brian@ojs-VirtualBox:~/ojs$ find . -name "*.php" -exec grep "import(" {} \; | wc
1467 1491 70313

What is it? How does it work?

I can't find any "import" in the php manual -- only include, require, include_once, require_once

I can't find a function import defined anywhere in the PHP files.

I want to work on adding bcrypt support to classes/security/Validate.inc.php; and I was trying to write some unit tests first, but I keep getting errors about "PHP Fatal error: Call to undefined function import()"

Thanks -- Brian

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: what is import?

Postby asmecher » Sat Aug 20, 2011 11:46 am

Hi Brian,

See lib/pkp/includes/functions.inc.php for the implementation of that function.

Alec Smecher
Public Knowledge Project Team

Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 1 guest