XCube
The foundational Core of XoopsCube Legacy
 
Loading...
Searching...
No Matches
XCube Namespace Reference

[Abstract] Fetches input values, validates fetched values and passes them to an object. More...

Detailed Description

[Abstract] Fetches input values, validates fetched values and passes them to an object.

This class defines an interface which XCube_ActionForm calls the check functions. But this class is designing now, you should not write a code which dependents on the design of this class. We designed this class as static method class group with a reason which a program can not generate many instance quickly. However, if we will find better method to solve a problem, we will change it.

The utility class collecting static helper functions.

The theme class.

This class manages XCube_Service instances, searches these, creates a much client instance. Now, the purpose of this class is for inside of own XOOPS site. In other words, this class doesn't work for publishing web services. About these separated working, the core team shall examine.

[Abstract] This class is a collection for functions.

[FINAL CLASS] The root object which collects exchangeable managers. This class offers the access course same as global variable for a logic in old mechanism. This class does not let you depend on a main controller class name You must not succeed to this class.

Provider class to manage role information with the store.

This is a target whom a render-system renders. This has a buffer and receives a result of a render-system to the buffer. A developer can control rendering BY using this class.

[Abstract] Defines an interface for the property class group. XCube_PropertyInterface is designed to work in XCube_ActionForm and XCube_Service (further dev). Therefore, only sub-classes of them should call constructors of XCube_Property classes.

XCube_PermissionUtils.

This is a utility class which acquires page navigation information — sort, offset and limit — semiautomatically. the base modules may offer placeholders which is able to connect with interfaces of this class.

This class manages resources of each languages. By requests of other components, this class loads files, or checks the existence of the specified resource, or composes filepath to access real files. And, it manages some locale informations.

Defines the basic functionality of an identity object.

Encapsulates major HTTP specific information about an HTTP request.

@WARNING This class is a simple wrapper class to process the uploaded file. However, we need to examine the position of this class. We are aiming at the simple file tree. This class is just a helper. We believe that the Cube system should not provide inappropriate help. We put this class in root/class for the advancement of this project. But, we should move it to another directory in a later stage.

XCube_Ref class is an adapted reference pointer for XCube_Delegate. 1) XCube_Ref : virtual function pointer 2) XCube_Delegate : Simple mechanism for common delegation in XCube.

This is an abstract class. A subclass of this class has many impositions that finally establishes the root object and implements a significant amount of actual logic.

/core/XCube_ActionFilter.class.php [Abstract] Used for initialization, post-processing and other purposes by the controller. This class is an abstract class. Typically, an abstract defines an interface for other classes to extend.

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

This class is chained and called by the initialization procedure of the controller class. Developers or users can use the subclass to customize dynamically.

Users usually do not need to add filters because each controller have sufficient initialization code. This class is used in case of special customization of modules and users.

A controller must not use this class in its initialization procedure.

Two member functions are called by the controller at the proper time. The timing is different for each controller.

/core/XCube_ActionForm.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

This class fetches the input value from the request value through the current context object and validates those values. It separates fetching and the validation layer from your main logic. Such class is important in a web program.

Plus, this action form features one-time token. The passed token informs the API that the bearer of the token has been authorized to access the API and perform specific actions. The token is registered in templates.

This is a simple suggestion of action form. We do not force a module developer to use this. You can learn more full-scale action forms from JAVA and .NET and other PHP. And, you must use any other tool auto-generating what you need to ActionForm as a sub-class of this class.

XCube_ActionForm contains the one-time token feature to protect against CSRF attacks But, if the current HTTP request is from the web service, the token isn't needed. Therefore, this class decides whether to use the token based on context information.

Remarks
This class is disabled for XCube_Service, because the class uses SESSION directly. XCube_ActionForm might change in the near feature. Developers should pay attention to any spec change.
Todo

The difference of array and no-array is too big.

Form object should have getValue(), isNull(), toString().

This form cannot be used in XCube_Service SOAP mode.

Virtual or Actual front controller class. /core/XCube_Controller.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

executeXXXXX() functions are a public member function called by an accessed file. These member functions call other protected member functions.

_setupXXXXX() functions are a protected member function overridden by a sub-class controller. Most of these functions are empty. A sub-class controller overrides them to set up a controller object and others.

_createXXXXX() functions are a protected member function overridden by a sub-class controller. These member functions are called in prepare() to set up the root object. And, they have been exported from prepare() for a sub-class controller to override easily. Most subclass controllers do not need to override them, as the code is usually there.

/core/XCube_Delegate.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/11/16

Because of XCube_Delegate virtual function pointers, it is impossible to pass variables as references to XCube_Delegate\call(). In a such case, use this class as an adapter.

A virtual function is a member function that you expect to be redefined in derived classes. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.

[Final] a.k.a. Java the C++ way. This class is an expression of reference in delegation mechanism since PHP4.

$object = new Object;
$delegate->call($object); // since PHP4, functions will receive the copied value of $object.
$object = new Object;
$delegate->call(new XCube_Delegate($object)); // since PHP4, functions will receive the object.
[Final] Used for the simple mechanism for common delegation in XCube.
Definition XCube_Delegate.class.php:101

/core/XCube_FormFile.class.php

Version
XCL 2.5.0
Author
Nobuhiro YASUTOMI, PHP8
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_HttpContext.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_Identity.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_LanguageManager.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

Rules about language are different at each bases. So it's important that a base defines the sub class of this class if it can't use this class directly.

And, XCube or bases have to make each languages possible to have its sub class. By that, languages become able to implement their logic to solve problems.

This class calls sub directories of each languages 'section'. 'section' is used to load image files and etc.

/core/XCube_Object.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_PageNavigator.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_Permission.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12
Remarks
In some other languages, such as C, a void function can't be used in an expression, only as a statement. IDEs and other tools can warn the user when the return value of a void function is being used. It isn't strictly necessary for the language itself to cover this. https://wiki.php.net/rfc/void_return_type#use_of_void_functions_in_expressions

/core/XCube_Property.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_RenderCache.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_RenderSystem.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

We had to define classes that are XCube_RenderTargetBuffer, XCube_RenderTargetTheme, XCube_RenderTargetBlock and XCube_RenderTargetMain. And, a render-system had to define render-sub-system that renders to these render-target. However, this style gives a heavy load to our XOOPSCube system that is a PHP application.

We prepare the following constants for the flag of a render-target instead of the group of many classes.

/core/XCube_RoleManager.class.php

Version
XCL 2.5.0
Author
Minahito, 2008/10/12

/core/XCube_Root.class.php

Version
XCL 2.5.0
Author
Nobuhiro YASUTOMI, PHP8
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/11/20

/core/XCube_Service.class.php

Version
XCL 2.5.0
Author
Nobuhiro YASUTOMI, PHP8
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12
Bug
This class does NOT work perfectly. It's fatal...
Todo
Improve XCube Service for SOAP and REST

/core/XCube_ServiceManager.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

XCube namespace can't contain the SOAP library directly. Delegate mechanism is good for this class. This class creates a client instance which connects to a service, following the kind of the service. For example, if the specified service is really a web service, the SOAP client has to be created. But, if the service is a virtual service of XCube, virtual client has to be created.

/core/XCube_Session.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_TextFilter.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_Theme.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_Utils.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

/core/XCube_Validator.class.php

Version
XCL 2.5.0
Author
Other authors gigamaster, 2020 XCL/PHP7
Minahito, 2008/10/12

Don't use these classes directly, you should use XCube_ActionForm only. This is 'protected' accesser in the namespace of XCube_ActionForm.