\n";
182 | }
183 |
184 | }
185 |
186 | return $this->html;
187 | }
188 |
189 | function getHtml() {
190 | return $this->html;
191 | }
192 |
193 | }
194 |
195 |
196 | ?>
--------------------------------------------------------------------------------
/docs/Class/Class.md:
--------------------------------------------------------------------------------
1 | Native: Class {#Class}
2 | ======================
3 |
4 | The base Class of the [MooTools](http://mootools.net/) framework.
5 |
6 | Class Method: constructor {#Class:constructor}
7 | ----------------------------------------------
8 |
9 | ### Syntax:
10 |
11 | var MyClass = new Class(properties);
12 |
13 | ### Arguments:
14 |
15 | 1. properties - (*object*) The collection of properties that apply to the Class. Also accepts some special properties such as Extends, Implements, and initialize (see below).
16 |
17 | #### Property: Extends
18 |
19 | * (*class*) The Class that this class will extend.
20 |
21 | The methods of This Class that have the same name as the Extends Class, will have a parent property, that allows you to call the other overridden method.
22 |
23 | #### Property: Implements
24 |
25 | * (*object*) A passed object's properties will be copied into this Class.
26 | * (*class*) The properties of a passed Class will be copied into the target Class.
27 | * (*array*) An array of objects or Classes, the properties of which will be copied into this Class.
28 |
29 | Implements is similar to Extends, except that it overrides properties without inheritance.
30 | Useful when implementing a default set of properties in multiple Classes.
31 |
32 | #### Property: initialize
33 |
34 | * (*function*) The initialize function will be the constructor for this class when new instances are created.
35 |
36 | ### Returns:
37 |
38 | * (*class*) The created Class.
39 |
40 | ### Examples:
41 |
42 | #### Class Example:
43 |
44 | var Cat = new Class({
45 | initialize: function(name){
46 | this.name = name;
47 | }
48 | });
49 | var myCat = new Cat('Micia');
50 | alert(myCat.name); //alerts 'Micia'
51 |
52 | var Cow = new Class({
53 | initialize: function(){
54 | alert('moooo');
55 | }
56 | });
57 | var Effie = new Cow($empty); //Will not alert 'moooo', because the initialize method is overridden by the $empty function.
58 |
59 | #### Extends Example:
60 |
61 | var Animal = new Class({
62 | initialize: function(age){
63 | this.age = age;
64 | }
65 | });
66 | var Cat = new Class({
67 | Extends: Animal,
68 | initialize: function(name, age){
69 | this.parent(age); //will call initalize of Animal
70 | this.name = name;
71 | }
72 | });
73 | var myCat = new Cat('Micia', 20);
74 | alert(myCat.name); //Alerts 'Micia'.
75 | alert(myCat.age); //Alerts 20.
76 |
77 | #### Implements Example:
78 |
79 | var Animal = new Class({
80 | initialize: function(age){
81 | this.age = age;
82 | }
83 | });
84 | var Cat = new Class({
85 | Implements: Animal,
86 | setName: function(name){
87 | this.name = name
88 | }
89 | });
90 | var myAnimal = new Cat(20);
91 | myAnimal.setName('Micia');
92 | alert(myAnimal.name); //Alerts 'Micia'.
93 |
94 |
95 |
96 |
97 | Class Method: implement {#Class:implement}
98 | ------------------------------------------
99 |
100 | Implements the passed in properties into the base Class prototypes, altering the base Class.
101 | The same as creating a [new Class](#Class:constructor) with the Implements property, but handy when you need to modify existing classes.
102 |
103 | ### Syntax:
104 |
105 | MyClass.implement(properties);
106 |
107 | ### Arguments:
108 |
109 | 1. properties - (*object*) The properties to add to the base Class.
110 |
111 | ### Examples:
112 |
113 | var Animal = new Class({
114 | initialize: function(age){
115 | this.age = age;
116 | }
117 | });
118 | Animal.implement({
119 | setName: function(name){
120 | this.name = name;
121 | }
122 | });
123 | var myAnimal = new Animal(20);
124 | myAnimal.setName('Micia');
125 | alert(myAnimal.name); //alerts 'Micia'
126 |
--------------------------------------------------------------------------------
/docs/Core/Browser.md:
--------------------------------------------------------------------------------
1 | Hash: Browser {#Browser}
2 | ========================
3 |
4 | Some browser properties are attached to the Browser Object for browser and platform detection.
5 |
6 | ### Features:
7 |
8 | * Browser.Features.xpath - (*boolean*) True if the browser supports DOM queries using XPath.
9 | * Browser.Features.xhr - (*boolean*) True if the browser supports native XMLHTTP object.
10 |
11 | ### Engine:
12 |
13 | * Browser.Engine.trident - (*boolean*) True if the current browser uses the trident engine (e.g. Internet Explorer).
14 | * Browser.Engine.gecko - (*boolean*) True if the current browser uses the gecko engine (e.g. Firefox, or any Mozilla Browser).
15 | * Browser.Engine.webkit - (*boolean*) True if the current browser uses the webkit engine (e.g. Safari, Google Chrome, Konqueror).
16 | * Browser.Engine.presto - (*boolean*) True if the current browser uses the presto engine (e.g. Opera 9).
17 | * Browser.Engine.name - (*string*) The name of the engine.
18 | * Browser.Engine.version - (*number*) The version of the engine. (e.g. 950)
19 | * Browser.Plugins.Flash.version - (*number*) The major version of the flash plugin installed.
20 | * Browser.Plugins.Flash.build - (*number*) The build version of the flash plugin installed.
21 |
22 | ### Platform:
23 |
24 | * Browser.Platform.mac - (*boolean*) True if the platform is Mac.
25 | * Browser.Platform.win - (*boolean*) True if the platform is Windows.
26 | * Browser.Platform.linux - (*boolean*) True if the platform is Linux.
27 | * Browser.Platform.ipod - (*boolean*) True if the platform is an iPod touch / iPhone.
28 | * Browser.Platform.other - (*boolean*) True if the platform is neither Mac, Windows, Linux nor iPod.
29 | * Browser.Platform.name - (*string*) The name of the platform.
30 |
31 | ### Notes:
32 |
33 | - Engine detection is entirely feature-based.
34 |
--------------------------------------------------------------------------------
/docs/Element/Element.Style.md:
--------------------------------------------------------------------------------
1 | Native: Element {#Element}
2 | ==========================
3 |
4 | Custom Native to allow all of its methods to be used with any DOM element via the dollar function [$][].
5 |
6 |
7 |
8 | Element Method: setStyle {#Element:setStyle}
9 | --------------------------------------------
10 |
11 | Sets a CSS property to the Element.
12 |
13 | ### Syntax:
14 |
15 | myElement.setStyle(property, value);
16 |
17 | ### Arguments:
18 |
19 | 1. property - (*string*) The property to set.
20 | 2. value - (*mixed*) The value to which to set it. Numeric values of properties requiring a unit will automatically be appended with 'px'.
21 |
22 | ### Returns:
23 |
24 | * (*element*) This element.
25 |
26 | ### Example:
27 | //Both lines have the same effect.
28 | $('myElement').setStyle('width', '300px'); //The width is now 300px.
29 | $('myElement').setStyle('width', 300); //The width is now 300px.
30 |
31 | ### Notes:
32 |
33 | - All number values will automatically be rounded to the nearest whole number.
34 |
35 |
36 |
37 | Element Method: getStyle {#Element:getStyle}
38 | --------------------------------------------
39 |
40 | Returns the style of the Element given the property passed in.
41 |
42 | ### Syntax:
43 |
44 | var style = myElement.getStyle(property);
45 |
46 | ### Arguments:
47 |
48 | 1. property - (*string*) The css style property you want to retrieve.
49 |
50 | ### Returns:
51 |
52 | * (*string*) The style value.
53 |
54 | ### Examples:
55 |
56 | $('myElement').getStyle('width'); //Returns "300px".
57 | $('myElement').getStyle('width').toInt(); //Returns 300.
58 |
59 |
60 |
61 | Element Method: setStyles {#Element:setStyles}
62 | ----------------------------------------------
63 |
64 | Applies a collection of styles to the Element.
65 |
66 | ### Syntax:
67 |
68 | myElement.setStyles(styles);
69 |
70 | ### Arguments:
71 |
72 | 1. styles - (*object*) An object of property/value pairs for all the styles to apply.
73 |
74 | ### Returns:
75 |
76 | * (*element*) This element.
77 |
78 | ### Example:
79 |
80 | $('myElement').setStyles({
81 | border: '1px solid #000',
82 | width: 300,
83 | height: 400
84 | });
85 |
86 | ### See Also:
87 |
88 | - [Element:getStyle][]
89 |
90 |
91 |
92 | Element Method: getStyles {#Element:getStyles}
93 | ----------------------------------------------
94 |
95 | Returns an object of styles of the Element for each argument passed in.
96 |
97 | ### Syntax:
98 |
99 | var styles = myElement.getStyles(property[, property2[, property3[, ...]]]);
100 |
101 | ### Arguments:
102 |
103 | 1. properties - (*strings*) Any number of style properties.
104 |
105 | ### Returns:
106 |
107 | * (*object*) An key/value object with the CSS styles as computed by the browser.
108 |
109 | ### Examples:
110 |
111 | $('myElement').getStyles('width', 'height', 'padding');
112 | //returns {width: "10px", height: "10px", padding: "10px 0px 10px 0px"}
113 |
114 | ### See Also:
115 |
116 | - [Element:getStyle][]
117 |
118 |
119 |
120 | [$]: /core/Element/Element/#dollar
121 | [Function]: /core/Native/Function
122 | [Element:getStyle]: #Element:getStyle
--------------------------------------------------------------------------------
/docs/Fx/Fx.CSS.md:
--------------------------------------------------------------------------------
1 | Class: Fx.CSS {#Fx-CSS}
2 | =======================
3 |
4 | CSS parsing class for effects. Required by [Fx.Tween][], [Fx.Morph][], [Fx.Elements][].
5 |
6 | Has no public methods.
7 |
8 |
9 |
10 | [Fx.Tween]: /core/Fx/Fx.Tween
11 | [Fx.Morph]: /core/Fx/Fx.Morph
12 | [Fx.Elements]: /more/Fx/Fx.Elements
--------------------------------------------------------------------------------
/docs/Fx/Fx.Transitions.md:
--------------------------------------------------------------------------------
1 | Class: Fx {#Fx}
2 | ===============
3 |
4 | Fx.Transitions overrides the base [Fx][] constructor, and adds the possibility to use the transition option as string.
5 |
6 | ### Transition option:
7 |
8 | The equation to use for the effect. See [Fx.Transitions][]. It accepts both a function (ex: Fx.Transitions.Sine.easeIn) or a string ('sine:in', 'bounce:out' or 'quad:in:out') that will map to Fx.Transitions.Sine.easeIn / Fx.Transitions.Bounce.easeOut / Fx.Transitions.Quad.easeInOut
9 |
10 |
11 | Hash: Fx.Transitions {#Fx-Transitions}
12 | ======================================
13 |
14 | A collection of tweening transitions for use with the [Fx][] classes.
15 |
16 | ### Examples:
17 |
18 | //Elastic.easeOut with default values:
19 | var myFx = $('myElement').effect('margin', {transition: Fx.Transitions.Elastic.easeOut});
20 |
21 | ### See also:
22 |
23 | - [Robert Penner's Easing Equations](http://www.robertpenner.com/easing/)
24 |
25 |
26 |
27 | Fx.Transitions Method: linear {#Fx-Transitions:linear}
28 | ------------------------------------------------------
29 |
30 | Displays a linear transition.
31 |
32 | Fx.Transitions Method: quad {#Fx-Transitions:quad}
33 | --------------------------------------------------
34 |
35 | Displays a quadratic transition. Must be used as Quad.easeIn or Quad.easeOut or Quad.easeInOut.
36 |
37 | Fx.Transitions Method: cubic {#Fx-Transitions:cubic}
38 | ----------------------------------------------------
39 |
40 | Displays a cubicular transition. Must be used as Cubic.easeIn or Cubic.easeOut or Cubic.easeInOut.
41 |
42 |
43 | Fx.Transitions Method: quart {#Fx-Transitions:quart}
44 | ----------------------------------------------------
45 |
46 | Displays a quartetic transition. Must be used as Quart.easeIn or Quart.easeOut or Quart.easeInOut.
47 |
48 | Fx.Transitions Method: quint {#Fx-Transitions:quint}
49 | ----------------------------------------------------
50 |
51 | Displays a quintic transition. Must be used as Quint.easeIn or Quint.easeOut or Quint.easeInOut
52 |
53 | Fx.Transitions Method: pow {#Fx-Transitions:pow}
54 | ------------------------------------------------
55 |
56 | Used to generate Quad, Cubic, Quart and Quint.
57 |
58 | ### Note:
59 |
60 | - The default is `p^6`.
61 |
62 | Fx.Transitions Method: expo {#Fx-Transitions:expo}
63 | --------------------------------------------------
64 |
65 | Displays a exponential transition. Must be used as Expo.easeIn or Expo.easeOut or Expo.easeInOut.
66 |
67 |
68 |
69 | Fx.Transitions Method: circ {#Fx-Transitions:circ}
70 | --------------------------------------------------
71 |
72 | Displays a circular transition. Must be used as Circ.easeIn or Circ.easeOut or Circ.easeInOut.
73 |
74 |
75 |
76 | Fx.Transitions Method: sine {#Fx-Transitions:sine}
77 | --------------------------------------------------
78 |
79 | Displays a sineousidal transition. Must be used as Sine.easeIn or Sine.easeOut or Sine.easeInOut.
80 |
81 |
82 |
83 | Fx.Transitions Method: back {#Fx-Transitions:back}
84 | --------------------------------------------------
85 |
86 | Makes the transition go back, then all forth. Must be used as Back.easeIn or Back.easeOut or Back.easeInOut.
87 |
88 |
89 |
90 | Fx.Transitions Method: bounce {#Fx-Transitions:bounce}
91 | ------------------------------------------------------
92 |
93 | Makes the transition bouncy. Must be used as Bounce.easeIn or Bounce.easeOut or Bounce.easeInOut.
94 |
95 |
96 |
97 | Fx.Transitions Method: elastic {#Fx-Transitions:elastic}
98 | --------------------------------------------------------
99 |
100 | Elastic curve. Must be used as Elastic.easeIn or Elastic.easeOut or Elastic.easeInOut
101 |
102 |
103 |
104 | Class: Fx.Transition {#Fx-Transition}
105 | =====================================
106 |
107 | This class is only useful for math geniuses who want to write their own easing equations.
108 | Returns an [Fx][] transition function with 'easeIn', 'easeOut', and 'easeInOut' methods.
109 |
110 | ### Syntax:
111 |
112 | var myTransition = new Fx.Transition(transition[, params]);
113 |
114 | ### Arguments:
115 |
116 | 1. transition - (*function*) Can be a [Fx.Transitions][] function or a user-provided function which will be extended with easing functions.
117 | 2. params - (*mixed*, optional) Single value or an array for multiple values to pass as the second parameter for the transition function.
118 |
119 | ### Returns:
120 |
121 | * (*function*) A function with easing functions.
122 |
123 | ### Examples:
124 |
125 | //Elastic.easeOut with user-defined value for elasticity.
126 | var myTransition = new Fx.Transition(Fx.Transitions.Elastic, 3);
127 | var myFx = $('myElement').effect('margin', {transition: myTransition.easeOut});
128 |
129 | ### See Also:
130 |
131 | - [Fx.Transitions][]
132 |
133 |
134 | [Fx]: /core/Fx/Fx
135 | [Fx.Transitions]: #Fx-Transitions
136 | [Element.effect]: /core/Element/#Element:effect
137 | [Linear]: ../Docs/assets/images/Linear.png
138 | [Quad]: ../Docs/assets/images/Quad.png
139 | [Cubic]: ../Docs/assets/images/Cubic.png
140 | [Quart]: ../Docs/assets/images/Quart.png
141 | [Quint]: ../Docs/assets/images/Quint.png
142 | [Expo]: ../Docs/assets/images/Expo.png
143 | [Circ]: ../Docs/assets/images/Circ.png
144 | [Sine]: ../Docs/assets/images/Sine.png
145 | [Back]: ../Docs/assets/images/Back.png
146 | [Bounce]: ../Docs/assets/images/Bounce.png
147 | [Elastic]: ../Docs/assets/images/Elastic.png
--------------------------------------------------------------------------------
/docs/Native/Number.md:
--------------------------------------------------------------------------------
1 | Native: Number {#Number}
2 | ========================
3 |
4 | A collection of the Number Object methods.
5 |
6 | ### See Also:
7 |
8 | - [MDC Number][]
9 |
10 | ### Notes:
11 |
12 | Every Math method is mirrored in the Number object, both as prototype and generic.
13 |
14 |
15 | Number Method: limit {#Number:limit}
16 | ------------------------------------
17 |
18 | Limits this number between two bounds.
19 |
20 | ### Syntax:
21 |
22 | myNumber.limit(min, max);
23 |
24 | ### Arguments:
25 |
26 | 1. min - (*number*) The minimum possible value.
27 | 2. max - (*number*) The maximum possible value.
28 |
29 | ### Returns:
30 |
31 | * (*number*) The number bounded between the given limits.
32 |
33 | ### Examples:
34 |
35 | (12).limit(2, 6.5); //Returns: 6.5
36 | (-4).limit(2, 6.5); //Returns: 2
37 | (4.3).limit(2, 6.5); //Returns: 4.3
38 |
39 |
40 |
41 | Number Method: round {#Number:round}
42 | ------------------------------------
43 |
44 | Returns this number rounded to the specified precision.
45 |
46 | ### Syntax:
47 |
48 | myNumber.round([precision]);
49 |
50 | ### Arguments:
51 |
52 | 1. precision - (*number*, optional: defaults to 0) The number of digits after the decimal place.
53 |
54 | ### Returns:
55 |
56 | * (number) The number, rounded.
57 |
58 | ### Notes:
59 |
60 | - Argument may also be negative.
61 |
62 | ### Examples:
63 |
64 | (12.45).round() //Returns: 12
65 | (12.45).round(1) //Returns: 12.5
66 | (12.45).round(-1) //Returns: 10
67 |
68 |
69 |
70 | Number Method: times {#Number:times}
71 | ------------------------------------
72 |
73 | Executes the function passed in the specified number of times.
74 |
75 | ### Syntax:
76 |
77 | myNumber.times(fn[, bind]);
78 |
79 | ### Arguments:
80 |
81 | 1. fn - (*function*) The function which should be executed on each iteration of the loop. This function is passed the current iteration's index.
82 | 2. bind - (*object*, optional) The object to use as 'this' in the function. For more information see [Function:bind](/Native/Function/#Function:bind).
83 |
84 | ### Examples:
85 |
86 | (4).times(alert); //Alerts "0", then "1", then "2", then "3".
87 |
88 |
89 |
90 | Number Method: toFloat {#Number:toFloat}
91 | ----------------------------------------
92 |
93 | Returns this number as a float. Useful because toFloat must work on both Strings and Numbers.
94 |
95 | ### Syntax:
96 |
97 | myNumber.toFloat();
98 |
99 | ### Returns:
100 |
101 | * (*number*) The number as a float.
102 |
103 | ### Examples:
104 |
105 | (111).toFloat(); //returns 111
106 | (111.1).toFloat(); //returns 111.1
107 |
108 |
109 |
110 | Number Method: toInt {#Number:toInt}
111 | ------------------------------------
112 |
113 | Returns this number as another number with the passed in base. Useful because toInt must work on both Strings and Numbers.
114 |
115 | ### Syntax:
116 |
117 | myNumber.toInt([base]);
118 |
119 | ### Arguments:
120 |
121 | 1. base - (*number*, optional: defaults to 10) The base to use.
122 |
123 | ### Returns:
124 |
125 | * (*number*) A number with the base provided.
126 |
127 | ### Examples:
128 |
129 | (111).toInt(); //returns 111
130 | (111.1).toInt(); //returns 111
131 | (111).toInt(2); //returns 7
132 |
133 |
134 |
135 | [MDC Number]: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Number
--------------------------------------------------------------------------------
/docs/Request/Request.HTML.md:
--------------------------------------------------------------------------------
1 | [Request]: /core/Request/Request
2 |
3 | Class: Request.HTML {#Request-HTML}
4 | ===================================
5 |
6 | Request Specifically made for receiving HTML.
7 |
8 | ### Extends:
9 |
10 | [Request][]
11 |
12 | ### Syntax:
13 |
14 | var myHTMLRequest = new Request.HTML([options]);
15 |
16 | ### Arguments:
17 |
18 | 1. options - (*object*, optional) See options below. Also inherited are all the options from [Request][].
19 |
20 | ### Options:
21 |
22 | * evalScripts - (*boolean*: defaults to true) If set to true, `script` tags inside the response will be evaluated. This overrides the `false` default from Request.
23 | * update - (*element*: defaults to null) The Element to insert the response text of the Request into upon completion of the request.
24 |
25 | ### Events:
26 |
27 | #### success
28 |
29 | * (*function*) Function to execute when the HTML request completes. This overrides the signature of the Request success event.
30 |
31 | ##### Signature:
32 |
33 | onSuccess(responseTree, responseElements, responseHTML, responseJavaScript)
34 |
35 | ##### Arguments:
36 |
37 | 1. responseTree - (*element*) The node list of the remote response.
38 | 2. responseElements - (*array*) An array containing all elements of the remote response.
39 | 3. responseHTML - (*string*) The content of the remote response.
40 | 4. responseJavaScript - (*string*) The portion of JavaScript from the remote response.
41 |
42 | ### Returns:
43 |
44 | * (*object*) A new Request.HTML instance.
45 |
46 | ### Examples:
47 |
48 | #### Simple GET Request:
49 |
50 | var myHTMLRequest = new Request.HTML().get('myPage.html');
51 |
52 | #### POST Request with data as String:
53 |
54 | var myHTMLRequest = new Request.HTML({url:'myPage.html'}).post("user_id=25&save=true");
55 |
56 | #### Data from Object Passed via GET:
57 |
58 | //Loads "load/?user_id=25".
59 | var myHTMLRequest = new Request.HTML({url:'load/'}).get({'user_id': 25});
60 |
61 | #### Data from Element via POST:
62 |
63 | ##### HTML
64 |
65 |
72 |
73 | ##### JavaScript
74 |
75 | //Needs to be in a submit event or the form handler.
76 | var myHTMLRequest = new Request.HTML({url:'save/'}).post($('user-form'));
77 |
78 | ### See Also:
79 |
80 | [Request][]
81 |
82 |
83 | Hash: Element.Properties {#Element-Properties}
84 | ==============================================
85 |
86 | see [Element.Properties](/Element/Element/#Element-Properties)
87 |
88 | Element Property: load {#Element-Properties:load}
89 | -------------------------------------------------
90 |
91 | ### Setter
92 |
93 | Sets a default Request.HTML instance for an Element.
94 |
95 | #### Syntax:
96 |
97 | el.set('load'[, options]);
98 |
99 | #### Arguments:
100 |
101 | 1. options - (*object*) The Request options.
102 |
103 | #### Returns:
104 |
105 | * (*element*) The target Element.
106 |
107 | #### Example:
108 |
109 | el.set('load', {evalScripts: true});
110 | el.load('some/request/uri');
111 |
112 |
113 | ### Getter
114 |
115 | Returns either the previously set Request.HTML instance or a new one with default options.
116 |
117 | #### Syntax:
118 |
119 | el.get('load', options);
120 |
121 | #### Arguments:
122 |
123 | 1. options - (*object*, optional) The Request.HTML options. If these are passed in, a new instance will be generated, regardless of whether or not one is set.
124 |
125 | #### Returns:
126 |
127 | * (*object*) The Request instance.
128 |
129 | #### Example:
130 |
131 | el.set('load', {method: 'get'});
132 | el.load('test.html');
133 | //The getter returns the Request.HTML instance, making its class methods available.
134 | el.get('load').post('http://localhost/script');
135 |
136 |
137 |
138 | Native: Element {#Element}
139 | ==========================
140 |
141 | Custom Native to allow all of its methods to be used with any DOM element via the dollar function [$][].
142 |
143 | Element Method: load {#Element:load}
144 | ------------------------------------
145 |
146 | Updates the content of the Element with a Request.HTML GET request.
147 |
148 | ### Syntax:
149 |
150 | myElement.load(url);
151 |
152 | ### Arguments:
153 |
154 | 1. url - (*string*) The URL pointing to the server-side document.
155 |
156 | ### Returns:
157 |
158 | * (*element*) The target Element.
159 |
160 | ### Example:
161 |
162 | ##### HTML
163 |
164 |
Loading content...
165 |
166 | ##### JavaScript
167 |
168 | $('content').load('page_1.html');
169 |
170 |
171 |
172 | ### See Also:
173 |
174 | - [$][], [Request](/Request/Request)
175 |
176 | [$]: /core/Element/Element/#dollar
177 |
--------------------------------------------------------------------------------
/docs/Request/Request.JSON.md:
--------------------------------------------------------------------------------
1 | Class: Request.JSON {#Request-JSON}
2 | =================================
3 |
4 | Wrapped Request with automated sending and receiving of JavaScript Objects in JSON Format.
5 |
6 | ### Extends:
7 |
8 | [Request](/Request/Request)
9 |
10 | ### Syntax:
11 |
12 | var myJSONRemote = new Request.JSON([options]);
13 |
14 | ### Arguments:
15 |
16 | 1. options - (*object*, optional) See below.
17 |
18 | ### Options:
19 |
20 | * secure - (*boolean*: defaults to true) If set to true, a syntax check will be done on the result JSON (see [JSON.decode](/Utilities/JSON#JSON:decode)).
21 |
22 | ### Events:
23 |
24 | #### success
25 |
26 | Fired when the request completes. This overrides the signature of the Request success event.
27 |
28 | ##### Signature:
29 |
30 | onSuccess(responseJSON, responseText)
31 |
32 | ##### Arguments:
33 |
34 | 1. responseJSON - (*object*) The JSON response object from the remote request.
35 | 2. responseText - (*string*) The JSON response as string.
36 |
37 | ### Returns:
38 |
39 | * (*object*) A new Request.JSON instance.
40 |
41 | ### Example:
42 |
43 | //This code will send a data object via a GET request and alert the retrieved data.
44 | var jsonRequest = new Request.JSON({url: "http://site.com/tellMeAge.php", onComplete: function(person){
45 | alert(person.age); //Alerts "25 years".
46 | alert(person.height); //Alerts "170 cm".
47 | alert(person.weight); //Alerts "120 kg".
48 | }}).get({'firstName': 'John', 'lastName': 'Doe'});
49 |
--------------------------------------------------------------------------------
/docs/Utilities/Cookie.md:
--------------------------------------------------------------------------------
1 | Object: Cookie {#Cookie}
2 | ========================
3 |
4 | Sets and accesses cookies.
5 |
6 | ### Credits:
7 |
8 | - Based on the functions by Peter-Paul Koch [QuirksMode][].
9 |
10 | ### Options: {#Cookie-options}
11 |
12 | * domain - (*string*: defaults to false) The domain the Cookie belongs to.
13 | * path - (*string*: defaults to false) The path the Cookie belongs to.
14 | * duration - (*number*: defaults to false) The duration of the Cookie before it expires, in days. If set to false or 0, the cookie will be a session cookie that expires when the browser is closed.
15 | * secure - (*boolean*: defaults to false) Stored cookie information can be accessed only from a secure environment.
16 |
17 | ### Notes:
18 |
19 | - In order to share the Cookie with pages located in a different path, the [Cookie.options.domain][] value must be set.
20 |
21 |
22 |
23 | Cookie Method: write {#Cookie:write}
24 | --------------------------------
25 |
26 | Writes a cookie in the browser.
27 |
28 | ### Syntax:
29 |
30 | var myCookie = Cookie.write(key, value[, options]);
31 |
32 | ### Arguments:
33 |
34 | 1. key - (*string*) The key (or name) of the cookie.
35 | 2. value - (*string*) The value to set. Cannot contain semicolons.
36 | 3. options - (*mixed*, optional) See [Cookie][].
37 |
38 | ### Returns:
39 |
40 | * (*object*) An object with the options, the key and the value. You can give it as first parameter to Cookie.remove.
41 |
42 | ### Examples:
43 |
44 | Saves the Cookie for the Duration of the Session:
45 |
46 | var myCookie = Cookie.write('username', 'Harald');
47 |
48 | Saves the Cookie for a Day:
49 |
50 | var myCookie = Cookie.write('username', 'JackBauer', {duration: 1});
51 |
52 |
53 |
54 | Cookie Method: read {#Cookie:read}
55 | --------------------------------
56 |
57 | Reads the value of a Cookie.
58 |
59 | ### Syntax:
60 |
61 | var myCookie = Cookie.read(name);
62 |
63 | ### Arguments:
64 |
65 | 1. name - (*string*) The name of the Cookie to retrieve.
66 |
67 | ### Returns:
68 |
69 | * (*mixed*) The cookie string value, or null if not found.
70 |
71 | ### Examples:
72 |
73 | Cookie.read("username");
74 |
75 |
76 |
77 | Cookie Method: dispose {#Cookie:dispose}
78 | --------------------------------------
79 |
80 | Removes a cookie from the browser.
81 |
82 | ### Syntax:
83 |
84 | var oldCookie = Cookie.dispose(cookie[, options]);
85 |
86 | ### Arguments:
87 |
88 | 1. name - (*string*) The name of the cookie to remove or a previously saved Cookie instance.
89 | 2. options - (*object*, optional) See [Cookie][].
90 |
91 | ### Examples:
92 |
93 | Remove a Cookie:
94 |
95 | Cookie.dispose('username'); //Bye-bye JackBauer! Seeya in 24 Hours.
96 |
97 | Creating a Cookie and Removing it Right Away:
98 |
99 | var myCookie = Cookie.write('username', 'Aaron', {domain: 'mootools.net'});
100 | if (Cookie.read('username') == 'Aaron') { Cookie.dispose(myCookie); }
101 |
102 |
103 |
104 | [Cookie]: #Cookie
105 | [Cookie.options]: #Cookie-options
106 | [Cookie.options.domain]: #Cookie-options
107 | [QuirksMode]: http://www.quirksmode.org
--------------------------------------------------------------------------------
/docs/Utilities/DomReady.md:
--------------------------------------------------------------------------------
1 | Window Event: domready
2 | ========================
3 |
4 | Contains the window Event 'domready', which will execute when the DOM has loaded. To ensure that DOM elements exist when the code attempting to access them is executed, they should be placed within the 'domready' event.
5 |
6 | This event is only available to the window Element.
7 |
8 | ### Example:
9 |
10 | window.addEvent('domready', function() {
11 | alert("The DOM is ready.");
12 | });
13 |
14 | ### See Also:
15 | [Element.Event][]
16 |
17 | [Element.Event]: /core/Element/Element.Event
--------------------------------------------------------------------------------
/docs/Utilities/JSON.md:
--------------------------------------------------------------------------------
1 | Object: JSON {#JSON}
2 | ====================
3 |
4 | JSON parser and encoder.
5 |
6 | ### See Also:
7 |
8 | - [JavaScript Object Notation (JSON.org)](http://www.json.org/)
9 |
10 | JSON Method: encode {#JSON:encode}
11 | ----------------------------------
12 |
13 | Converts an object or array to a JSON string.
14 |
15 | ### Syntax:
16 |
17 | var myJSON = JSON.encode(obj);
18 |
19 | ### Arguments:
20 |
21 | 1. obj - (*object*) The object to convert to string.
22 |
23 | ### Returns:
24 |
25 | * (*string*) A JSON string.
26 |
27 | ### Examples:
28 |
29 | var fruitsJSON = JSON.encode({apple: 'red', lemon: 'yellow'}); // returns: '{"apple":"red","lemon":"yellow"}'
30 |
31 |
32 |
33 | JSON Method: decode {#JSON:decode}
34 | ----------------------------------
35 |
36 | Converts a JSON string into an JavaScript object.
37 |
38 | ### Syntax:
39 |
40 | var object = JSON.decode(string[, secure]);
41 |
42 | ### Arguments:
43 |
44 | 1. string - (*string*) The string to evaluate.
45 | 2. secure - (*boolean*, optional: defaults to false) If set to true, checks for any hazardous syntax and returns null if any found.
46 |
47 | ### Returns:
48 |
49 | * (*object*) The object represented by the JSON string.
50 |
51 | ### Examples:
52 |
53 | var myObject = JSON.decode('{"apple":"red","lemon":"yellow"}'); //returns: {apple: 'red', lemon: 'yellow'}
54 |
55 | ### Credits:
56 |
57 | - JSON test regexp is by [Douglas Crockford](http://crockford.com/) and [Tobie Langel](http://tobielangel.com/).
58 |
--------------------------------------------------------------------------------
/docs/Utilities/Swiff.md:
--------------------------------------------------------------------------------
1 | Class: Swiff {#Swiff}
2 | =====================
3 |
4 | Creates and returns a Flash object using supplied parameters.
5 |
6 | ### Credits:
7 |
8 | Flash detection and Internet Explorer/Flash Player 9 fix adapted from [SWFObject][].
9 |
10 | ### Syntax:
11 |
12 | var mySwiff = new Swiff(path[, options]);
13 |
14 | ### Arguments:
15 |
16 | 1. path - (*string*) The path to the SWF file.
17 | 2. options - (*object*, optional) See Options below.
18 |
19 | ### Options:
20 |
21 | * id - (*string*: defaults to 'Swiff\_' + unique id) The id of the SWF object.
22 | * width - (*number*: defaults to 1) The width of the SWF object.
23 | * height - (*number*: defaults to 1) The height of the SWF object.
24 | * container - (*element*) The container into which the SWF object will be injected.
25 | * params - (*object*) Parameters to be passed to the SWF object (wmode, bgcolor, allowScriptAccess, loop, etc.).
26 | * allowScriptAccess - (*string*: defaults to always) The domain that the SWF object allows access to.
27 | * quality - (*string*: defaults to 'high') The render quality of the movie.
28 | * swLiveConnect - (*boolean*: defaults to true) the swLiveConnect parameter to allow remote scripting.
29 | * wMode - (*string*: defaults to 'transparent') Allows the SWF to be displayed with a transparent background.
30 | * properties - (*object*) Additional attributes for the object element.
31 | * vars - (*object*) Vars will be passed to the SWF as querystring in flashVars.
32 | * callBacks - (*object*) Functions to call from the SWF. These will be available globally in the movie, and bound to the object.
33 |
34 | ### Returns:
35 |
36 | * (*element*) A new HTML object Element.
37 |
38 | ### Example:
39 |
40 | var obj = new Swiff('myMovie.swf', {
41 | id: 'myBeautifulMovie',
42 | width: 500,
43 | height: 400,
44 | params: {
45 | wmode: 'opaque',
46 | bgcolor: '#ff3300'
47 | },
48 | vars: {
49 | myVariable: myJsVar,
50 | myVariableString: 'hello'
51 | },
52 | callBacks: {
53 | load: myOnloadFunc
54 | }
55 | });
56 |
57 | ### Note:
58 |
59 | 1. Although Swiff returns the object, this element will NOT have any Element methods applied to it.
60 | 2. The $ function on an object/embed tag will only return its reference without further processing.
61 |
62 | Swiff Function: remote {#Swiff:remote}
63 | --------------------------------------
64 |
65 | Calls an ActionScript function from JavaScript.
66 |
67 | ### Syntax:
68 |
69 | var result = Swiff.remote(obj, fn);
70 |
71 | ### Arguments:
72 |
73 | 1. obj - (*element*) A Swiff instance (an HTML object Element).
74 | 2. fn - (*string*) The name of the function to execute in the Flash movie.
75 |
76 | ### Returns:
77 |
78 | * (*mixed*) The ActionScript function's result.
79 |
80 | ### Example:
81 |
82 | var obj = new Swiff('myMovie.swf');
83 | //Alerts "This is from the .swf file!".
84 | alert(Swiff.remote(obj, 'myFlashFn'));
85 |
86 | ### Note:
87 |
88 | The SWF file must be compiled with the ExternalInterface component. See the Adobe documentation on [External Interface][] for more information.
89 |
90 | [SWFObject]: http://blog.deconcept.com/swfobject/
91 | [External Interface]: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001652.html
--------------------------------------------------------------------------------
/github.php:
--------------------------------------------------------------------------------
1 | repo_path = '';
32 |
33 |
34 | /**
35 | * The is the local path on your server where you have the Git
36 | * clone of your project (w/docs).
37 | *
38 | * Note:
39 | * This folder must be a pre-existing Git clone repository.
40 | *
41 | * Due to the limitations of Git, your entire repository will
42 | * be stored in this directory. If you don't want this, you
43 | * may want to create a separate repository just for your docs.
44 | */
45 | $config->path = './';
46 |
47 |
48 | /**
49 | * Update Key
50 | *
51 | * Prevents unauthorized updates. Be sure to include this when
52 | * entering the Post-Receive URL in GitHub.
53 | *
54 | * @example http://example.com/github.php?key=myKEYgoesHERE
55 | */
56 | $config->key = 'CHANGE_ME';
57 |
58 |
59 | /**
60 | * Git Pull Shell Command
61 | *
62 | * You may need to set the full path to your Git executable depending
63 | * on how Git is setup on your server.
64 | *
65 | * Adding " 2>&1" to the end of the command will allow you to see any
66 | * errors that occurred during the git update in the log file.
67 | */
68 | $config->command = 'git pull 2>&1';
69 |
70 |
71 | /**
72 | * GitHub Error Log
73 | *
74 | * Filename & path where you want to store the GitHub error log.
75 | * If you don't with to keep a log, simply set the string to ''.
76 | */
77 | $config->log = 'github.log';
78 |
79 |
80 |
81 |
82 |
83 |
84 | /**
85 | * Verify that an authorized client is submitting the request...
86 | */
87 | if (!isset($_REQUEST['key']) || $_REQUEST['key'] != $config->key)
88 | _die('ERROR: Incorrect Key');
89 |
90 | /**
91 | * Check to see if we have a payload to process...
92 | */
93 | if (!isset($_REQUEST['payload']))
94 | _die('ERROR: No payload received');
95 |
96 |
97 | /**
98 | * Analyze the JSON data, if possible, use the built in PHP function,
99 | * if that doesn't exist, fall back to the slower alternate method.
100 | */
101 | if (!function_exists('json_decode')) {
102 | require_once 'assets/json.php';
103 | $json = new Services_JSON();
104 | $paylaod = $json->decode($_REQUEST['payload']);
105 | }else {
106 | $paylaod = json_decode($_REQUEST['payload']);
107 | }
108 |
109 |
110 |
111 | /**
112 | * Verify that we have something to process...
113 | */
114 | if (!isset($paylaod->commits))
115 | _die('ERROR: No commits to process');
116 |
117 |
118 | /**
119 | * Create a list of files added, removed, or modified from the commit,
120 | * and store them in as an array in $files.
121 | */
122 | $files = array();
123 | foreach ($paylaod->commits as $commit) {
124 |
125 | if (isset($commit->added))
126 | $files = array_merge($files,$commit->added);
127 |
128 | if (isset($commit->removed))
129 | $files = array_merge($files,$commit->removed);
130 |
131 | if (isset($commit->modified))
132 | $files = array_merge($files,$commit->modified);
133 | }
134 |
135 |
136 |
137 | $update = false;
138 |
139 | if (empty($config->repo_path)){
140 |
141 | /**
142 | * If the path is empty, we need to do an update, every time.
143 | */
144 | $update = true;
145 |
146 | }elseif(!empty($config->repo_path)) {
147 |
148 | /**
149 | * Otherwise, run through the changed files, and see if any files
150 | * have been changed in the docs directory of the repository
151 | */
152 | foreach ($files as $file) {
153 | if (strpos($file,$config->repo_path) !== false) {
154 | $update = true;
155 | break;
156 | }
157 | }
158 |
159 | }
160 |
161 |
162 | /**
163 | * No updates exist...
164 | */
165 | if (!$update)
166 | _die('No updates necessary');
167 |
168 |
169 |
170 | /**
171 | * It's time to update...
172 | */
173 |
174 | // Move to the path
175 | chdir($config->path);
176 | // Do the pull...
177 | $last_line = system($config->command,$exit_code);
178 |
179 |
180 | if ($exit_code !== 0 || strpos($last_line,'fatal:') !== false)
181 | _die("ERROR: Couldn't update local repository");
182 |
183 |
184 |
185 | _die('Success!');
186 |
187 | function _die($message='')
188 | {
189 | global $config;
190 |
191 | if (empty($config->log))
192 | die($message);
193 |
194 | $log = "##################################################\n";
195 | $log .= date('r')."\n";
196 | $log .= "$message\n";
197 | $log .= ob_get_contents()."\n";
198 |
199 | file_put_contents($config->log,$log,FILE_APPEND);
200 |
201 | die();
202 | }
203 |
204 | ?>
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | $file,
12 | 'menu' => $menu,
13 | 'doc' => $doc,
14 | 'toc' => $toc->getHtml(),
15 | 'title' => "mDocs" . " - " . $file
16 | );
17 |
18 | print json_encode($return);
19 | exit;
20 | }
21 |
22 |
23 | ?>
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
40 |
41 |
42 |
43 |
48 |
49 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/licenses/docs.md:
--------------------------------------------------------------------------------
1 | Sample Documentation
2 | ====================
3 |
4 | The sample documentation has been copied from the [MooTools][mt] project, which is released under a Creative Commons [Attribution-NonCommercial-ShareAlike 3.0][cc] license.
5 |
6 |
7 | [mt]: http://github.com/mootools/mootools-core/tree/master/
8 | [cc]: http://creativecommons.org/licenses/by-nc-sa/3.0/
9 |
10 |
--------------------------------------------------------------------------------
/licenses/geshi.md:
--------------------------------------------------------------------------------
1 | GeSHi - GEneric Syntax HIghlighter
2 | ==================================
3 | Version 1.0.8
4 |
5 | Author: Nigel McNie, Benny Baumann
6 | Email: nigel@geshi.org, BenBE@omorphia.de
7 | GeSHi Website:
8 |
9 | GeSHi is a generic syntax highlighter, written in PHP. You simply
10 | input the source code you wish to highlight with the language you
11 | wish to use, and the output will be a file syntax highlighted to
12 | XHTML standards.
13 |
14 | For more information on how to use GeSHi, please consult the
15 | documentation. If you got this readme from a GeSHi package, then
16 | the documentation is available in the docs/ directory. Documentation
17 | is also available at
18 |
19 | If you think you've found a bug in GeSHi, contact me with a bug
20 | report at BenBE@omorphia.de, or submit it to the bug tracker at
21 | . Be
22 | aware that minor highlighting errors may well just be incorrect
23 | language files, but if you do find something major please contact me.
24 |
25 | And if you're using GeSHi as a plugin/mod for some other software,
26 | please tell me about it! It's worth a link to you, and I can give
27 | you specialist help if you need it.
28 |
29 | GeSHi is free software, released under the GNU GPL. Please see the
30 | [COPYING](http://www.opensource.org/licenses/gpl-2.0.php) file for
31 | more information. If you do modify this program, please tell me about
32 | it! Perhaps you've made a good improvement that I can learn from :)
--------------------------------------------------------------------------------
/licenses/markdown.md:
--------------------------------------------------------------------------------
1 | PHP Markdown & Extra
2 | ====================
3 |
4 | Copyright (c) 2004-2008 Michel Fortin
5 |
6 | All rights reserved.
7 |
8 | Based on Markdown
9 | Copyright (c) 2003-2006 John Gruber
10 |
11 | All rights reserved.
12 |
13 | Redistribution and use in source and binary forms, with or without
14 | modification, are permitted provided that the following conditions are
15 | met:
16 |
17 | * Redistributions of source code must retain the above copyright notice,
18 | this list of conditions and the following disclaimer.
19 |
20 | * Redistributions in binary form must reproduce the above copyright
21 | notice, this list of conditions and the following disclaimer in the
22 | documentation and/or other materials provided with the distribution.
23 |
24 | * Neither the name "Markdown" nor the names of its contributors may
25 | be used to endorse or promote products derived from this software
26 | without specific prior written permission.
27 |
28 | This software is provided by the copyright holders and contributors "as
29 | is" and any express or implied warranties, including, but not limited
30 | to, the implied warranties of merchantability and fitness for a
31 | particular purpose are disclaimed. In no event shall the copyright owner
32 | or contributors be liable for any direct, indirect, incidental, special,
33 | exemplary, or consequential damages (including, but not limited to,
34 | procurement of substitute goods or services; loss of use, data, or
35 | profits; or business interruption) however caused and on any theory of
36 | liability, whether in contract, strict liability, or tort (including
37 | negligence or otherwise) arising in any way out of the use of this
38 | software, even if advised of the possibility of such damage.
39 |
--------------------------------------------------------------------------------
/mdocs.php:
--------------------------------------------------------------------------------
1 | path = 'docs/';
23 |
24 | /**
25 | * The Markdown file extension used for all the documentation files.
26 | */
27 | $config->extension = '.md';
28 |
29 | /**
30 | * The file to load, when no file is specified
31 | */
32 | $config->index = 'Core/Core';
33 |
34 | /**
35 | * Default Syntax Highlighting Language
36 | * @see /assets/geshi/ for complete list.
37 | */
38 | $config->language = 'javascript';
39 |
40 | /**
41 | * The highest/lowest header level to include in the Table of Contents
42 | * You shouldn't need to change these.
43 | */
44 | $config->maxlevel = 1;
45 | $config->minlevel = 2;
46 |
47 | /**
48 | * Ignore files in the root of Docs?
49 | */
50 | $config->ignore = true;
51 |
52 |
53 |
54 | /**
55 | * @todo Possibly move this ugly logic code into a class or function
56 | */
57 |
58 | // Determine the file to load:
59 | $file = (isset($_GET['file']) && !empty($_GET['file']))? clean_filename($_GET['file']) : $config->index;
60 |
61 | $config->filename = $config->path.$file.$config->extension;
62 |
63 | if (!(file_exists($config->filename) && is_readable($config->filename))){
64 | /**
65 | * @todo Possibly show a 404 page
66 | */
67 | die('ERROR: Document not found.');
68 | }
69 |
70 | $doc = file_get_contents($config->filename);
71 |
72 |
73 | // Get the classes:
74 | require_once 'assets/markdown.php';
75 | require_once 'assets/markdown.mdocs.php';
76 | require_once 'assets/toc.php';
77 | require_once 'assets/menu.php';
78 | require_once 'assets/geshi.php';
79 | require_once 'assets/geshi.mdocs.php';
80 |
81 |
82 | // Initialize Markdown
83 | $markdown = new MarkdownExtra_Parser_mDocs();
84 | $markdown->maxlevel = & $config->maxlevel;
85 | $markdown->minlevel = & $config->minlevel;
86 |
87 | // Initialize Table of Contents
88 | $toc = new TOC();
89 | $toc->content = & $doc;
90 | $toc->maxlevel = & $config->maxlevel;
91 | $toc->minlevel = & $config->minlevel;
92 | $toc->delimiter = ':';
93 | $toc->trim = '$ ';
94 |
95 | // Initialize Docs Menu
96 | $menu = new menu();
97 | $menu->dir = & $config->path;
98 | $menu->filetype = & $config->extension;
99 |
100 | // Initialize GeSHi (Syntax Highlighting)
101 | $geshi = new GeSHi_mDocs();
102 | $geshi->default_language = & $config->language;
103 |
104 |
105 | // Apply Markdown Syntax:
106 | $doc = $markdown->transform($doc);
107 |
108 | // Apply GeSHi Syntax Highlighting:
109 | $doc = $geshi->parse_codeblocks($doc);
110 |
111 | // Create Menu:
112 | $menu->generate($config->ignore);
113 |
114 | // Create TOC:
115 | $toc->generate();
116 |
117 |
118 | /**
119 | * Helper Functions:
120 | * @todo Possibly move this to a separate file
121 | */
122 |
123 |
124 | /**
125 | * Clean Filename Path
126 | *
127 | * Yes, it's overkill, but why not, it's fun!
128 | * This function allows only the following characters to pass:
129 | * A-Z a-z 0-9 - _ . /
130 | *
131 | * It also goes into great detail to make sure that troublesome
132 | * slash and period characters are not abused by would-be hackers.
133 | * So because of this, you can't read any file or folder that starts
134 | * or ends with a period, but then again, you shouldn't have public
135 | * files named like that in the first place, right?
136 | *
137 | * @param string $file
138 | * @return string $filename
139 | */
140 | function clean_filename($filename='')
141 | {
142 | $patern[] = '/[^\w\.\-\_\/]/';
143 | $replacement[] = '';
144 |
145 | $patern[] = '/\.+/';
146 | $replacement[] = '.';
147 |
148 | $patern[] = '/\/+/';
149 | $replacement[] = '/';
150 |
151 | $patern[] = '/(\/\.|\.\/)/';
152 | $replacement[] = '/';
153 |
154 | $patern[] = '/\.+/';
155 | $replacement[] = '.';
156 |
157 | $patern[] = '/\/+/';
158 | $replacement[] = '/';
159 |
160 | $filename = preg_replace($patern,$replacement,$filename);
161 | $filename = trim($filename,' ./\\');
162 |
163 | return $filename;
164 | }
165 |
166 | ?>
--------------------------------------------------------------------------------