mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
docs: add headings
This commit is contained in:
parent
5a97137c20
commit
31720766b8
@ -44,6 +44,9 @@ Convenience Functions
|
||||
|
||||
Two functions have been provided for getting a service. These functions are always available.
|
||||
|
||||
service()
|
||||
---------
|
||||
|
||||
The first is ``service()`` which returns a new instance of the requested service. The only
|
||||
required parameter is the service name. This is the same as the method name within the Services
|
||||
file always returns a SHARED instance of the class, so calling the function multiple times should
|
||||
@ -55,6 +58,9 @@ If the creation method requires additional parameters, they can be passed after
|
||||
|
||||
.. literalinclude:: services/004.php
|
||||
|
||||
single_service()
|
||||
----------------
|
||||
|
||||
The second function, ``single_service()`` works just like ``service()`` but returns a new instance of
|
||||
the class:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user