-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
77 changed files
with
1,265 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,9 +67,10 @@ private function __construct() | |
* | ||
* @access public | ||
* @author Jerome Bogaerts, <[email protected]> | ||
* @param string login The login of the user. | ||
* @param string password the md5 hash of the password. | ||
* @param allowedRoles A Role or an array of Roles that are allowed to be logged in. If the user has a Role that matches one or more Roles in this array, the login request will be accepted. | ||
* @param string $login The login of the user. | ||
* @param string $password the md5 hash of the password. | ||
* @param $allowedRoles - A Role or an array of Roles that are allowed to be logged in. If the user has a Role that | ||
* matches one or more Roles in this array, the login request will be accepted. | ||
* @return boolean | ||
*/ | ||
public function login(common_user_auth_Adapter $adapter, $allowedRoles = []) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,9 +357,17 @@ public function countInstances($propertyFilters = [], $options = []) | |
* @param array options | ||
* @return \core_kernel_classes_Resource[] | ||
*/ | ||
public function getInstancesPropertyValues(core_kernel_classes_Property $property, $propertyFilters = [], $options = []) | ||
{ | ||
return (array) $this->getImplementation()->getInstancesPropertyValues($this, $property, $propertyFilters, $options); | ||
public function getInstancesPropertyValues( | ||
core_kernel_classes_Property $property, | ||
$propertyFilters = [], | ||
$options = [] | ||
) { | ||
return (array) $this->getImplementation()->getInstancesPropertyValues( | ||
$this, | ||
$property, | ||
$propertyFilters, | ||
$options | ||
); | ||
} | ||
|
||
/** | ||
|
@@ -394,7 +402,9 @@ public function createInstanceWithProperties($properties) | |
|
||
$additionalTypes = []; | ||
if (isset($properties[OntologyRdf::RDF_TYPE])) { | ||
$types = is_array($properties[OntologyRdf::RDF_TYPE]) ? $properties[OntologyRdf::RDF_TYPE] : [$properties[OntologyRdf::RDF_TYPE]]; | ||
$types = is_array($properties[OntologyRdf::RDF_TYPE]) | ||
? $properties[OntologyRdf::RDF_TYPE] | ||
: [$properties[OntologyRdf::RDF_TYPE]]; | ||
foreach ($types as $type) { | ||
$uri = is_object($type) ? $type->getUri() : $type; | ||
if ($uri != $this->getUri()) { | ||
|
@@ -418,8 +428,9 @@ public function createInstanceWithProperties($properties) | |
* | ||
* @access public | ||
* @author Jerome Bogaerts, <[email protected]> | ||
* @param array resources An array of core_kernel_classes_Resource or URIs. | ||
* @param boolean deleteReference If set to true, references about the resources will also be deleted from the database. | ||
* @param array $resources An array of core_kernel_classes_Resource or URIs. | ||
* @param boolean $deleteReference If set to true, references about the resources will also be deleted from the | ||
* database. | ||
* @return boolean | ||
*/ | ||
public function deleteInstances($resources, $deleteReference = false) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -422,9 +422,11 @@ public function getColumnNotFoundErrorCode() | |
* @abstract | ||
* @access public | ||
* @author Jerome Bogaerts, <[email protected]> | ||
* @param string indexName The name of the index to create. | ||
* @param string tableName A table name | ||
* @param array columns An associative array that represents the columns on which the index applies. The keys of the array are the name of the columns, the values are the length of the data to index in the column. If there is no length limitation, set the value of the array cell to null. | ||
* @param string $indexName The name of the index to create. | ||
* @param string $tableName A table name | ||
* @param array $columns An associative array that represents the columns on which the index applies. The keys of | ||
* the array are the name of the columns, the values are the length of the data to index in | ||
* the column. If there is no length limitation, set the value of the array cell to null. | ||
* @return void | ||
*/ | ||
public function createIndex($indexName, $tableName, $columns) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,10 +109,15 @@ private function getImplementation() | |
public function __construct($uri, $debug = '') | ||
{ | ||
if (empty($uri)) { | ||
throw new common_exception_Error('cannot construct the resource because the uri cannot be empty, debug: ' . $debug); | ||
throw new common_exception_Error( | ||
'cannot construct the resource because the uri cannot be empty, debug: ' . $debug | ||
); | ||
} | ||
if (!is_string($uri) && !$uri instanceof self) { | ||
throw new common_exception_Error('could not create resource from ' . (is_object($uri) ? get_class($uri) : gettype($uri)) . ' debug: ' . $debug); | ||
throw new common_exception_Error( | ||
'could not create resource from ' . (is_object($uri) ? get_class($uri) : gettype($uri)) | ||
. ' debug: ' . $debug | ||
); | ||
} | ||
$this->uriResource = $uri instanceof self ? $uri->getUri() : $uri; | ||
} | ||
|
@@ -126,7 +131,9 @@ public function __construct($uri, $debug = '') | |
*/ | ||
public function __clone() | ||
{ | ||
throw new common_exception_DeprecatedApiMethod('Use duplicated instead, because clone resource could not share same uri that original'); | ||
throw new common_exception_DeprecatedApiMethod( | ||
'Use duplicated instead, because clone resource could not share same uri that original' | ||
); | ||
} | ||
|
||
public function isCustom(): bool | ||
|
@@ -196,7 +203,8 @@ public function isProperty() | |
* Returns all the types of this resource as core_kernel_classes_Class objects. | ||
* | ||
* @author Joel Bout <[email protected]> | ||
* @return core_kernel_classes_Class[] An associative array where keys are class URIs and values are core_kernel_classes_Class objects. | ||
* @return core_kernel_classes_Class[] An associative array where keys are class URIs and values are | ||
* core_kernel_classes_Class objects. | ||
*/ | ||
public function getTypes() | ||
{ | ||
|
@@ -287,8 +295,9 @@ public function setComment($comment) | |
* | ||
* @access public | ||
* @author Joel Bout, <[email protected]> | ||
* @param Property property uriProperty is string and may be short in the case of a locally defined property (module namespace), or long uri | ||
* @param array options | ||
* @param core_kernel_classes_Property $property uriProperty is string and may be short in the case of a locally | ||
* defined property (module namespace), or long uri | ||
* @param array $options | ||
* @return array | ||
*/ | ||
public function getPropertyValues(core_kernel_classes_Property $property, $options = []) | ||
|
@@ -358,7 +367,9 @@ public function getOnePropertyValue(core_kernel_classes_Property $property, $las | |
{ | ||
$returnValue = null; | ||
if ($last) { | ||
throw new core_kernel_persistence_Exception('parameter \'last\' for getOnePropertyValue no longer supported'); | ||
throw new core_kernel_persistence_Exception( | ||
'parameter \'last\' for getOnePropertyValue no longer supported' | ||
); | ||
}; | ||
|
||
$options = [ | ||
|
@@ -595,7 +606,8 @@ public function duplicate($excludedProperties = []) | |
* | ||
* @author [email protected] | ||
* | ||
* @param bool deleteReference set deleteReference to true when you need that all reference to this resource are removed. | ||
* @param bool $deleteReference set deleteReference to true when you need that all reference to this resource are | ||
* removed. | ||
* | ||
* @return bool | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.