Hi all
I download the last version of RAP , and i'm try to use their documentation.
The problem is whene i follow the doc and implement the examples, find many error like :
-Strict Standards: Non-static method ModelFactory::getDefaultModel() should not be called statically.
- no function like :ModelFactory->add(); ModelFactory->getproperty(); ...... and other.
and i don't find in api/model/Model.php.
Pls help me
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I faced the problem, too. It can be fixed. First off, the functionality is not compromised because of the warnings (it shows warnings, not errors. Suffice it to say that the latest RAP version is 5 yrs old and php has changed a lot during that time). So here's the fix:
Go to the api/model/ModelFactory.php file and change the all the functions to "static". For example, change
__static function & getDbModel($dbStore, $baseURI = null)__
(that's your warning, gone. ;) ) and similarly for the others.
Go to the api/util/RdfUtil.php and change all the functions to "static" there, too.
This should get most of the basic examples working. This is however, not the complete fix. The complete fix would require doing the same thing to many more files. I'd recommend you go about your development and change the functions that throw a warning to "static" as and when you use them. Also, do not change any functions with the variable "$this" to static.
That should get you going.
Cheers
Sid
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all
I download the last version of RAP , and i'm try to use their documentation.
The problem is whene i follow the doc and implement the examples, find many error like :
-Strict Standards: Non-static method ModelFactory::getDefaultModel() should not be called statically.
- no function like :ModelFactory->add(); ModelFactory->getproperty(); ...... and other.
and i don't find in api/model/Model.php.
Pls help me
I faced the problem, too. It can be fixed. First off, the functionality is not compromised because of the warnings (it shows warnings, not errors. Suffice it to say that the latest RAP version is 5 yrs old and php has changed a lot during that time). So here's the fix:
to:
(that's your warning, gone. ;) ) and similarly for the others.
This should get most of the basic examples working. This is however, not the complete fix. The complete fix would require doing the same thing to many more files. I'd recommend you go about your development and change the functions that throw a warning to "static" as and when you use them. Also, do not change any functions with the variable "$this" to static.
That should get you going.
Cheers
Sid