Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pquery
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
pquery
Commits
e96bbce1
Commit
e96bbce1
authored
13 years ago
by
Taddes Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Chancged plugin filename format.
parent
4463c836
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
index.php
+2
-2
2 additions, 2 deletions
index.php
pquery.array.php
+1
-1
1 addition, 1 deletion
pquery.array.php
pquery.config.php
+3
-3
3 additions, 3 deletions
pquery.config.php
pquery.php
+15
-6
15 additions, 6 deletions
pquery.php
pquery.sql.php
+1
-1
1 addition, 1 deletion
pquery.sql.php
with
22 additions
and
13 deletions
index.php
+
2
−
2
View file @
e96bbce1
<?php
include_once
'../debug.php'
;
include_once
'
base
.php'
;
pQuery
::
require_plugins
(
'array'
,
'sql'
);
include_once
'
pquery
.php'
;
__p
::
require_plugins
(
'array'
,
'sql'
);
// Array test
/*$a = _p(range(0, 10));
...
...
This diff is collapsed.
Click to expand it.
array.php
→
pquery.
array.php
+
1
−
1
View file @
e96bbce1
<?php
/**
* pQuery
extentio
n for executing common array functions.
* pQuery
plugi
n for executing common array functions.
*
* @package pQuery
*/
...
...
This diff is collapsed.
Click to expand it.
config.php
→
pquery.
config.php
+
3
−
3
View file @
e96bbce1
<?php
/**
* Base and
extentio
n config for pQuery utility framework.
* Base and
plugi
n config for pQuery utility framework.
*
* @package pQuery
*/
...
...
@@ -29,11 +29,11 @@ define('PQUERY_ROOT', 'D:/xampp/htdocs/pquery/');
define
(
'ERROR_IS_FATAL'
,
true
);
/**
* Abstract class containing
extentio
n configs.
* Abstract class containing
plugi
n configs.
*/
abstract
class
Config
{
/**
* Config for MySQL
extentio
n.
* Config for MySQL
plugi
n.
*
* @var array
*/
...
...
This diff is collapsed.
Click to expand it.
base
.php
→
pquery
.php
+
15
−
6
View file @
e96bbce1
...
...
@@ -5,19 +5,26 @@
* @package pQuery
*/
include_once
'config.php'
;
include_once
'
pquery.
config.php'
;
/**
* Common utility class.
*/
class
pQuery
{
/**
* Pattern of th
a
alias created for an extending plugin that has defined an alias.
* Pattern of th
e
alias created for an extending plugin that has defined an alias.
*
* @var string
*/
const
CLASS_ALIAS_PATTERN
=
'__%s'
;
/**
* Pattern of a plugin's filename.
*
* @var string
*/
const
PLUGIN_FILENAME_PATTERN
=
'pquery.%s.php'
;
/**
* The minimum php version required to use the framework.
*
...
...
@@ -156,12 +163,12 @@ class pQuery {
* @param mixed $type the variable type of the class to load.
*/
static
function
load_plugin
(
$type
)
{
$
file
=
PQUERY_ROOT
.
$type
.
'.php'
;
$
path
=
PQUERY_ROOT
.
sprintf
(
self
::
PLUGIN_FILENAME_PATTERN
,
$type
)
;
if
(
!
file_exists
(
$
file
)
)
if
(
!
file_exists
(
$
path
)
)
return
false
;
include_once
$
file
;
include_once
$
path
;
return
true
;
}
...
...
@@ -173,7 +180,7 @@ class pQuery {
$plugins
=
func_get_args
();
foreach
(
$plugins
as
$plugin
)
{
$path
=
PQUERY_ROOT
.
$plugin
.
'.php'
;
$path
=
PQUERY_ROOT
.
sprintf
(
self
::
PLUGIN_FILENAME_PATTERN
,
$plugin
)
;
if
(
!
file_exists
(
$path
)
)
{
return
self
::
error
(
'Required plugin "%s" could not be located (looked in "%s").'
,
...
...
@@ -223,5 +230,7 @@ function _p($variable, $plugin=null) {
return
new
$class_name
(
$variable
);
}
class_alias
(
'pQuery'
,
'__p'
);
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
sql.php
→
pquery.
sql.php
+
1
−
1
View file @
e96bbce1
<?php
/**
* pQuery
extentio
n for executing MySQL queries.
* pQuery
plugi
n for executing MySQL queries.
*
* @package pQuery
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment