|http [s] : //||yourdomain.com /||[ project-name /]||[ lang /]||[ controller /]||[ function /]||[ param1 / param2 ... ]|
The above URL sections are reviewed step by step below.
# Section Headings
# HTTP / S
# HTTP / S
The URL :: site () method is used to create a URL in the ZN Framework . The predefined value of the URL that this method will generatehttp: // It is set.
When you set up your site security certificate, your links need to be converted to http den HTTPS. The following setting is sufficient for this.
'ssl' => false
To get this value of the URL, you can use the following method.
You can use the URL :: host () method to get this value .
You can use the following method to capture the value of http: // localhost.
This is the section that contains the name of the project to run from the project directories in the / directory. There is no need to write if the directory to run is the predefined directory. You only need to type the directory name to run the other directories.
We have run Projects / Backend / directory above .
The project directory that is run by default is Projects / Frontend / . To change the predefined opening project directory, you can make the necessary setting from the following configuration file.
'default' => 'Frontend'
To access your project indexes, you can give them aliases to represent these directory names. Use the following configuration file to configure this setting.
'panel' => 'Backend'
After editing above, you can run the Backend / directory via the following URL .
You can find detailed information on what this section is used for in the multi-project development department.
You can use the following method to find out the name of the project directory being run on the URL.
If this section is enabled in the configuration file, it becomes visible in the URL :: site () method. So this section is predefined. Indicates site's adjusted language value. You can activate this section from the configuration file below.
'lang' => true
After editing the above URL :: site () method produces the following output.
The Lang :: set () method is used to change this value .
Lang::set('tr'); echo URL::site('product/list');
This change is also possible if the URL is changed and operated by the URL.
The Lang :: get () method is used to catch the currently selected language shortening .
This section specifies which of the controllers in the Controllers / directory should be run in the ZN Framework . Explanation of this section was made in connection with MVC / Controller .
The CURRENT_CONTROLLER constant must be used to catch the controller name . With different methods this partition is reachable but gives the real controller name because it is not affected by these fixed routes.
This section describes the function information of the controller expressed in the previous section. The use of this section is also explained in the MVC / Controller link.
The CURRENT_CFUNCTION constant must be used to capture the method name . This constant gives the actual function name that is being executed at that time. It is not affected by fixed rods.
This is the section used to send data to the controller method that is executed. This and all subsequent chapters are used for parameter submission.
The CURRENT_CPARAMETERS constant can be used to trap parameters . Apart from this constant, you can also define the parameters of the corresponding method and also the parameters with the sequential variables.
output( CURRENT_CPARAMETERS );