Giter Site home page Giter Site logo

docs's People

Contributors

andresgutierrez avatar arhell avatar beliarh avatar cameronhall avatar diplopito avatar dogstartest avatar dschissler avatar emiliodeg avatar fvromera avatar igusev avatar inouet avatar jeckerson avatar kenjikobe avatar kevinjay avatar matheusribak avatar mowangjuanzi avatar netstu avatar niden avatar qzfzz avatar rcsv avatar rigin avatar ruudboon avatar sergeyklay avatar sidroberts avatar sjinks avatar unisys12 avatar uonick avatar xboston avatar xueron avatar zamronypj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

doc has error? i'm not sure

http://docs.phalconphp.com/en/latest/reference/di.html

"localhost", "username" => "root", "password" => "secret", "dbname" => "invo" )); } /** * Creates a connection only once and returns it */ public static function getSharedConnection() { if (self::$_connection===null){ $connection = self::_createConnection(); self::$_connection = $connection; } return self::$_connection; } /** * Always returns a new connection */ public static function getNewConnection() { return self::_createConnection(); } ``` } class SomeComponent { ``` protected $_connection; /** * Sets the connection externally */ public function setConnection($connection){ $this->_connection = $connection; } /** * This method always needs the shared connection */ public function someDbTask() { $connection = $this->_connection; // ... } /** * This method always needs a new connection */ public function someOtherDbTask($connection) { } ``` } $some = new SomeComponent(); //This injects the shared connection $some->setConnection(Registry::getSharedConnection()); $some->someDbTask(); //Here, we always pass a new connection as parameter $some->someOtherDbTask(Registry::getConnection()); // Registry::getNewConnection(); ?

[NFR] Add phpdoc comments in C sources of available properties

@property-read if property is available through getter method
@property-write if property is available through setter method
@property if property is public or available through getter and setter methods

For example in (acl/adapter/memory.c):

/**
 * Phalcon\Acl\Adapter\Memory
 *
 * Manages ACL lists in memory
 *
 * ... description and usage examples
 *
 * @property-read Phalcon\Acl\Role[] $roles An array with every role registered in the list
 * @property-read Phalcon\Acl\Resource[] $resources An array with every resource registered in the list
 */

Tutorial 1 documentation - code block modification

I ran into the issue described in #90 (Phalcon\Tag::linkTo - subfolder missing from URL) and eventually found the code snippet to resolve it.

$di->set('url', function(){
     $url = new \Phalcon\Mvc\Url();
     $url->setBaseUri('/tutorial/');
     return $url;
});

Please can the above code be added to the code block in the Tutorial 1 documentation so that it matches the suggested file/folder structure. That way newcomers won't be stumbling at the first hurdle.

Many thanks.

Mention how Models get mapped to tables

The docs state models should be named with camelCase. Not mentioned is the fact that camelCase is required because that's how Phalcon determines what table to map to.

For example, I had a table called access_log. All the documentation has single-word models and tables, so I wasn't sure how to name my accompanying model to ensure it maps toaccess_log. I tried Access_Log but it added an extra underline.

Just a mention in the docs that says something to the effect of "If your model name has multiple words, Phalcon will separate those words with underscores to determine the database table to map to".

Volt filters: default

Volt filters docs say:

default Sets a default value in case that the evaluated expression is null

Actually, the generated PHP code for {{ var|default('?') }} looks like this:

<?php echo (empty($var) ? ('?') : ($var)); ?>

which means that $var can be 0, null, false, '' and even not defined at all. Since this behavior is very useful, I assume that's a bug in the docs and should be corrected to:

default Sets a default value in case that the evaluated expression is empty (is not set or evaluates to a falsy value)

Enhanche EventsManager documentation

(from here: phalcon/cphalcon#1980)

The Events Manageer page needs improvements:

  • No examples on how to use it with DI, like on other pages. Usually people want it with the framework, not as an individual component. Need examples on how to, for instance, integrate it with 'dispatch'.
  • Need to outline that even when you use FactoryDefault, services are not bound to the eventsManager service by default! This has reasons, but the default DI pretends to be full of features, and it's strange to see some of them missing.

These are trivial, but not obvious for newcomers.

Spelling Errata

There are a noticeable amount of errata in documentation, a spell-checker software will unearth them to you.

Not apparent in tutorial.rst that each view needs to be an index.html within a folder with the controller prefix

https://github.com/phalcon/docs/blob/master/en/reference/tutorial.rst

The initial information about views indicates that the structure is view/index.phtml rather than what it should be index/index.phtml meaning when you come to add the signup view, you expect to use views/signup.phtml instead of what you should use views/signup/index.phtml.

A simple sentence explaining this would have saved me half an hour or guessing.

Has 'transifex.com' been deprecated?

I has wrote some Chinese translation to 'transifex.com' on 3 days ago, but it's still with 'UNREVIEWED' status. Has 'transifex.com' been deprecated ? whether I must push them to Github? My 'transifex.com' ID is 'mr5'.

Assets\Manager: VERY incomplete

Assets page lacks the following:

  • Examples on how to add assets and output them from templates
  • Real-life minifying example (see this issue from volt
  • Configuration options: sourceBasePath, targetBasePath

API page for \Assets\Manager lacks the following:

  • Configuration options: sourceBasePath, targetBasePath
  • Method output() is completely missing

API page for \Assets\Collection:

  • Method setPrefix() is missing

Too bad users have to look into the sources to learn the above.

Images not working in latest documentation

The images in the latest documentation are showing as relative URLs printed in the page instead of displaying the images.

Example:
http://docs.phalconphp.com/en/latest/reference/tutorial-invo.html
Under Project Structure, I see the following line: reference/../static/img/invo-1.png
The image does exist at http://docs.phalconphp.com/en/latest/static/img/invo-1.png
The path should be either prepended with /en/latest/ or have reference/ removed.

Other pages are affected as well:
http://docs.phalconphp.com/en/latest/reference/migrations.html
http://docs.phalconphp.com/en/latest/reference/tools.html

Router default parameter value

Hi, defined a route like this:

$router->add('/{date}', [
'controller' => 'index',
'action' => 'index',
'defaults' => [
'date' => 'today'
]
]);

and var_dump in action seems to pick up it correctly but handle() method in front controller seem to have problem with it:

Warning: Illegal offset type in /Users/aleksander/php/kociouek/public/index.php on line 27
Call Stack

Time Memory Function Location

1 0.0002 239888 {main}( ) ../index.php:0
2 0.0010 270800 handle ( ) ../index.php:27
3 0.0012 276496 handle ( ) ../index.php:27

Incorrect URL in screenshots

The following files have the directory "test" in the URL, but they should have "tutorial":

https://github.com/Pajamaman/docs/blob/master/en/_static/img/tutorial-1.png
https://github.com/Pajamaman/docs/blob/master/en/_static/img/tutorial-2.png
https://github.com/Pajamaman/docs/blob/master/en/_static/img/tutorial-3.png
https://github.com/Pajamaman/docs/blob/master/en/_static/img/tutorial-4.png

I would fix this myself but I don't have the bandwidth to clone the repo.

This goes for other languages as well.

Use simple quote instead of double quote in documentation

Hello,

Did you know double quotes consumes more than simple quote ? When you use double quotes, PHP verify the string to verify the existence of variables, example:

$name = 'S';
$test = "Hello $name";
echo $test;

Result: Hello S

with simple quote, PHP don't do this verification:

$name = 'S';
$test = 'Hello $name';
echo $test;

Result: Hello $name

$name = 'S';
$test = 'Hello ' . $name;
echo $test;

Result: Hello S

So I think you should replace any unnecessary double quotes in your documentation by single quote to gain performance boost ! :)

Possible necessary addition to PHQL docs

Hi,

I'm using PHQL in my command line application. When I used this:

$Query = new Phalcon\Mvc\Model\Query($sql, $this->di);

I got an error saying wrong number of errors, and that "PHQL Statement cannot be NULL".

When I changed that to

$Query = $this->modelsManager->createQuery($sql);

The query ran just fine.

So, is this a failure of MY code, a bug in Phalcon, or an omission in the docs?

Incomplete API docs

After the 2.0 release, someone should compare the API docs with the source to resolve the following:

  • Missing methods (see #334)
  • Wrong descriptions (copy-pasted and not fixed)
  • Wrong argument types & return types
  • The most annoying: most classes do not document their options (also see #334). If some function accepts an array, the user needs to know an array of what is expected at the input.

Issues with the micro version

Hello,

There are some issues with the micro version :

This is the code snippet :

//Return a rendered view
$app->get('/products/show', function() use ($app) {

// Render app/views/products/show.phtml passing some variables
echo $app['view']->render('products/show', array(
        'id' => 100,
        'name' => 'Artichoke'
    ));

});

with echo : PHP Catchable fatal error: Object of class Phalcon\Mvc\View could not be converted to string

I tried to replace echo with "return" and I got this

PHP Fatal error: Call to undefined function Phalcon\Mvc\View::issent()

on
$app->handle();

Error in the last example of PHQL / Joins

I'm trying to find a way to generate sql from phql, so far without luck. The last example in PHQL#Joins says that:

$phql = 'SELECT Brands.name, Songs.name FROM Artists ' .
        'JOIN Songs WHERE Artists.genre = "Trip-Hop"';
$result = $this->modelsManager->query($phql);

Produce the following SQL in MySQL:

SELECT `brands`.`name`, `songs`.`name` FROM `artists`
INNER JOIN `albums` ON `albums`.`artists_id` = `artists`.`id`
INNER JOIN `songs` ON `albums`.`songs_id` = `songs`.`id`
WHERE `artists`.`genre` = 'Trip-Hop'

Does it demonstrate what happens in MySql or does it actually sets $result value to that string?

The error seems to be the missing query method, perhaps the executeQuery was meant?

Wrong graph data in benchmark

The data in the first two graphs of "Hello World Benchmark" differ from the shown benchmarks: While the benchmark for Yii shows 961.28 requests/s, the first graph shows only 851,83. The second graph shows a value of 1,174 ms/request for Yii, while the benchmark shows 1,040 ms/request, Data for other frameworks seem to be correct, but not for Yii.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.