Skip to content

Commit

Permalink
Fixing typos, updating style, version
Browse files Browse the repository at this point in the history
  • Loading branch information
phalcon committed Feb 14, 2013
1 parent 0f10939 commit cfe7615
Show file tree
Hide file tree
Showing 15 changed files with 292 additions and 70 deletions.
222 changes: 196 additions & 26 deletions _static/docs.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@

html {
background: none;
}

body {
color: #333333;
font-family: "Open Sans",sans-serif;
font-size: 13px;
line-height: 1.231;
text-align: center;
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 22px;
margin: 0 0 11px;
}

#nav-main {
background-color: #2C2C2C;
background-image: -moz-linear-gradient(center top , #333333, #222222);
}

h2 {
Expand All @@ -18,14 +27,15 @@ h2 {
margin: 25px 0 0;
}

p, li {
color: #434343;
font-size: 16px;
line-height: 24px;
margin-left: 0;
min-height: 0;
h3 {
font-weight: 600;
margin: 15px 0 10px;
}

/*p, li {
color: #434343;
}*/

td.primary-box li {
padding: 0px;
line-height: 16px;
Expand Down Expand Up @@ -122,7 +132,7 @@ div.related li.right {
}

div.related li.right a {
background: #339A6B;
background: none repeat scroll 0 0 #0088CC;
padding: 10px;
border-radius: 5px;
color: #fff;
Expand All @@ -133,7 +143,9 @@ div.related li.right a {
}

p.versionadded {
background: none repeat scroll 0 0 #A8CEBB;
color: #468847;
background-color: #dff0d8;
border-color: #d6e9c6;
font-size: 15px;
margin-left: 20px;
margin-right: 20px;
Expand Down Expand Up @@ -163,14 +175,13 @@ span.versionmodified {
font-style: italic;
}

div.highlight {
/*div.highlight {
background: none repeat scroll 0 0 #212121;
margin: 7px 5px 5px;
max-width: 95%;
overflow-x: scroll;
text-align: left;
margin-left: 0px;
/*padding: 5px;*/
}
div.highlight,
Expand Down Expand Up @@ -199,7 +210,7 @@ blockquote p {
font-size: 14px;
line-height: 18px;
color: #DCDCCC;
}
}*/

p.topless {
margin: 0px;
Expand All @@ -218,8 +229,7 @@ div.figure {
color: #EFDCBC;
}

.highlight .k,
.highlight .kt {
.highlight .k {
color: #F0DFAF;
font-weight: bold;
}
Expand All @@ -240,7 +250,8 @@ div.figure {

.highlight .s,
.highlight .s1,
.highlight .s2 {
.highlight .s2,
.highlight .sb {
color: #CC9393;
}

Expand All @@ -263,7 +274,8 @@ div.figure {
}

.highlight .mi,
.highlight .mf {
.highlight .mf,
.highlight .m {
color: #8CD0D3;
}

Expand All @@ -290,27 +302,36 @@ div.figure {
color: #DADADA;
}

.highlight .si {
color: #EFDCBC;
font-style: italic;
}

.highlight .kd {
color: #919191;
}

table.docutils {
border-collapse: collapse;
border-top: 1px solid #ABABAB;
border-left: 1px solid #ABABAB;
border-top: 1px solid #DDDDDD;
border-left: 1px solid #DDDDDD;
margin-left: auto;
margin-right: auto;
width: 90%;
width: 95%;
margin-bottom: 15px;
border-radius: 4px;
}

table.docutils td,
table.docutils th {
color: #434343;
border-bottom: 1px solid #ABABAB;
border-right: 1px solid #ABABAB;
font-size: 1.2em;
border-bottom: 1px solid #DDDDDD;
border-right: 1px solid #DDDDDD;
padding: 5px;
}

table.docutils th {
background: none repeat scroll 0 0 #DADADA;
background: none repeat scroll 0 0 #F9F9F9;
text-align: center;
}

Expand All @@ -319,3 +340,152 @@ table.docutils tr {
margin: 0px;
}

div#methods h2,
div#constants h2 {
color: #999999;
}

div#methods a,
div#constants a, {
text-decoration: none;
}

div#methods a:hover {
text-decoration: underline;
}

div#methods em,
div#constants em {
color: #0088CC;
}

p.method-desc {
margin-left: 25px;
font-size: 14px;
margin-bottom: 20px;
margin-top: 10px;
}

div#methods span.modifier {
color: #267B0C;
}

div#methods span.inherited {
color: #999999;
font-style: italic;
}

em {
font-style: normal;
}

p.versionchanged, blockquote.highlights {
background-color: #D9EDF7;
border-color: #BCE8F1;
color: #3A87AD;
}

div#footer {
padding: 50px 10px;
background: none repeat scroll 0 0 #006DA5;
font-size: 12px;
}

div#footer p {
display: block;
margin: 0px;
font-size: 12px;
}

div.highlight, blockquote {
font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
background-color: #F5F5F5;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px 4px 4px 4px;
display: block;
font-size: 13px;
line-height: 17px;
margin: 0 0 11px;
padding: 5px;
padding-left: 10px;
word-wrap: break-word;
}

div.highlight {
word-break: break-all;
}

.highlight .sd {
color: #717171;
font-weight: normal;
}

.highlight .k {
color: #1E347B;
font-weight: normal;
}

.highlight .nf,
.highlight .nc {
color: #48484C;
font-weight: normal;
}

.highlight .nv {
color: #48484C;
}

.highlight .nx,
.highlight .na,
.highlight .nb {
color: teal;
}

.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb {
color: #DD1144;
}

.highlight .c1, .highlight .cm {
color: #93A1A1;
font-style: italic;
}

.highlight .o {
color: #1E347B;
}

.highlight .cp {
color: rgba(0, 0, 0, 0.4);
}

.highlight .nt {
color: #1E347B;
font-weight: normal;
}

.highlight .si {
color: coral;
font-weight: normal;
}

.highlight .mi, .highlight .mf, .highlight .m {
color: teal;
}

.highlight .ni {
color: teal;
font-weight: bold;
}

.highlight .kn {
color: #000000;
font-weight: normal;
}

.highlight .sr {
color: #717171;
}

pre {
font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
}
4 changes: 2 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
# built documents.
#
# The short X.Y version.
version = '0.5.x'
version = '1.0.x'

# The full version, including alpha/beta/rc tags.
release = '0.5.0'
release = '1.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 3 additions & 1 deletion index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Welcome to Phalcon Internals
============================

Phalcon is not a traditional framework, it's written as an C extension for PHP to provide high performance. The purpose of this document is to explain how it is built internally. If you're interested in helping to improve Phalcon, or simply understand how it works, this is the information you need.
Phalcon is not a traditional framework, it's written as an C extension for PHP to provide high performance.
The purpose of this document is to explain how it is built internally. If you're interested in helping improve Phalcon,
or simply understand how it works, this is the information you need.

Other formats
-------------
Expand Down
3 changes: 2 additions & 1 deletion reference/arrays.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Working with Arrays
===================
Although the Zend API, and provides various functions for working with arrays, with Phalcon API we added others. Specifically helping to maintain the reference counting correctly:
Although the Zend API provides several functions for working with arrays, the Phalcon API has added others.
Specifically helping to maintain the reference counting correctly:

One dimension Arrays
^^^^^^^^^^^^^^^^^^^^
Expand Down
18 changes: 13 additions & 5 deletions reference/classes.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Classes
=======
As an object oriented framework, Phalcon is mostly composed of classes. The classes are organized into namespaces. The following are the steps to export a variable in the extension and also make it available for other classes inside the framework.
As an object oriented framework, Phalcon is mostly composed of classes. The classes are organized into namespaces.
The following are the steps to export a variable in the extension and also make it available for other classes
inside the framework.

Registering methods and its arguments
-------------------------------------
In the dev/php_phalcon.h register in the first part of the file the pointer to the zend class entry. Let's pretend we're adding a Phalcon\\Auth to the framework:
In the dev/php_phalcon.h register in the first part of the file the pointer to the zend class entry. Let's pretend
we're adding a Phalcon\\Auth to the framework:

.. code-block:: c
Expand All @@ -18,7 +21,8 @@ Then, we can add the methods prototypes, it's neccesary to add all the methods t
PHP_METHOD(Phalcon_Auth, getIdentity);
PHP_METHOD(Phalcon_Auth, auth);
Later in the same file add the information of the arguments of each method. For example, let's define the class constructor only takes two arguments and they're mandatory:
Later in the same file add the information of the arguments of each method. For example, let's define the class
constructor only takes two arguments and they're mandatory:

.. code-block:: c
Expand Down Expand Up @@ -64,7 +68,9 @@ Each class has its own file .c file, in the case of Phalcon\\Auth file would be
PHALCON_MM_RESTORE();
}
With the above code we create the constructor of the class Phalcon\\Auth, a method is defined with the macro PHP_METHOD, first we put the class name and then the name of the method, although Phalcon uses namespaces, class names have _ instead of \\:
With the above code we create the constructor of the class Phalcon\\Auth, a method is defined with the macro
PHP_METHOD, first we put the class name and then the name of the method, although Phalcon uses namespaces,
class names have _ instead of \\:

.. code-block:: c
Expand All @@ -79,7 +85,9 @@ If the method has parameters we receive them using zend_parse_parameters:
RETURN_NULL();
}
If we do not receive the correct number of parameters will result in an error message. You see, there's an argument "zz" to receive the parameters, this indicates the type of data received and the number of them. In the above example that means that the method is receiving two parameters. If it were three zval then it should be "zzz".
If we do not receive the correct number of parameters will result in an error message. You see, there's an argument
"zz" to receive the parameters, this indicates the type of data received and the number of them. In the above example
that means that the method is receiving two parameters. If they were three zval then it should be "zzz".

Then the variables are received in respective order: &adapter_name, &options

Loading

0 comments on commit cfe7615

Please sign in to comment.