protected function getObjectRequestedById(string $class) {
	
		// reads from url requested item id
		$itemId = Router::get(0);
		
		if (!$itemId) {
			$this->enqueueError($this->lang('NO_ID_OF_ITEM_TO_EDIT', $class));
			return NULL;
		}
		
		$object = new $class($itemId);
	
		if ($object->isLoaded()) {
				
			return $object;
	
		} else {
	
			$this->enqueueError($this->lang('ID_OF_ITEM_TO_EDIT_IS_NOT_VALID', $class));
			$this->logError('Object ' . $class . ' id=' . $itemId . ' has not been loaded');
			return NULL;
	
		}
	
	}
protected function getObjectRequestedById(string $class) {
	
		// reads from url requested item id
		$itemId = Router::get(0);
		
		if (!$itemId) {
			$this->enqueueError($this->lang('NO_ID_OF_ITEM_TO_EDIT', $class));
			return NULL;
		}
		
		$object = new $class($itemId);
	
		if ($object->isLoaded()) {
				
			return $object;
	
		} else {
	
			$this->enqueueError($this->lang('ID_OF_ITEM_TO_EDIT_IS_NOT_VALID', $class));
			$this->logError('Object ' . $class . ' id=' . $itemId . ' has not been loaded');
			return NULL;
	
		}
	
	}
protected function getObjectRequestedById ( string $ class ) { // reads from url requested item id $ itemId = Router :: get ( 0 ) ; if ( ! $ itemId ) { $ this -> enqueueError ( $ this -> lang ( 'NO_ID_OF_ITEM_TO_EDIT' , $ class ) ) ; return NULL ; } $ object = new $ class ( $ itemId ) ; if ( $ object -> isLoaded ( ) ) { return $ object ; } else { $ this -> enqueueError ( $ this -> lang ( 'ID_OF_ITEM_TO_EDIT_IS_NOT_VALID' , $ class ) ) ; $ this -> logError ( 'Object ' . $ class . ' id=' . $ itemId . ' has not been loaded' ) ; return NULL ; } }
Returns the object of inherited class when called with id as first parameter.

@param	string	Expected object class type.
@return	object|NULL
Returns the object of inherited class when called with id as first parameter .