1 | <?php |
||
14 | class Join { |
||
15 | /** |
||
16 | * Construct a JOIN container. |
||
17 | * |
||
18 | * @param \GV\Source $join The form we're joining to. |
||
19 | * @param \GV\Field $join_column Its column. |
||
20 | * @param \GV\Source $join_on The form we're joining on. |
||
21 | * @param \GV\Field $join_on_column Its column. |
||
22 | * |
||
23 | * @return \GV\Joins $this |
||
24 | */ |
||
25 | 4 | public function __construct( $join, $join_column, $join_on, $join_on_column ) { |
|
42 | |||
43 | /** |
||
44 | * Inject this join into the query. |
||
45 | * |
||
46 | * @param \GF_Query $query The \GF_Query instance. |
||
47 | * |
||
48 | * @return \GF_Query The $query |
||
49 | */ |
||
50 | 4 | public function as_query_join( $query ) { |
|
74 | } |
||
75 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.