{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/11478","repository_url":"https://api.github.com/repos/phalcon/cphalcon","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11478/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11478/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11478/events","html_url":"https://github.com/phalcon/cphalcon/issues/11478","id":137573760,"number":11478,"title":"compileStatement - volt compiler","user":{"login":"skmail","id":3670810,"avatar_url":"https://avatars.githubusercontent.com/u/3670810?v=3","gravatar_id":"","url":"https://api.github.com/users/skmail","html_url":"https://github.com/skmail","followers_url":"https://api.github.com/users/skmail/followers","following_url":"https://api.github.com/users/skmail/following{/other_user}","gists_url":"https://api.github.com/users/skmail/gists{/gist_id}","starred_url":"https://api.github.com/users/skmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skmail/subscriptions","organizations_url":"https://api.github.com/users/skmail/orgs","repos_url":"https://api.github.com/users/skmail/repos","events_url":"https://api.github.com/users/skmail/events{/privacy}","received_events_url":"https://api.github.com/users/skmail/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-01T13:24:42Z","updated_at":"2016-03-03T11:03:50Z","closed_at":"2016-03-03T11:03:50Z","body":"Any idea why statement variable in compileStatement extension  is  not being  passed by reference ?passing this variable by reference  will  make volt compiler more powerfull, NO? \r\n\r\nhttps://github.com/phalcon/cphalcon/blob/master/phalcon/mvc/view/engine/volt/compiler.zep#L2010\r\n\r\nsince we cannot use variables/functions  in the  {% extends \"layout.volt\" %}   statement, this will make the maintenance of the views and layout directories  very hard while project getting bigger. so by adding an extension with ability to override statement variable, we can use something  like the following :\r\n\r\n\t\r\n```\r\n{# view.volt  #}\r\n{% extends \"dashboard_layout\" %}\r\n\r\n...\r\n\r\nclass ExtendsStatement{\r\n    public function compileStatement($statement)\r\n    {\r\n        if($statement['type'] == 310 && $statement['path']['value'] == 'dashboard_layout')\r\n        { \r\n                $statement['path']['value'] = 'layouts/layout_1.volt'; \r\n        }\r\n    }\r\n}\r\n```\r\n\r\n\r\nis there  any problem with this ?\r\n\r\nRegards\r\n"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/191709124","html_url":"https://github.com/phalcon/cphalcon/issues/11478#issuecomment-191709124","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11478","id":191709124,"user":{"login":"skmail","id":3670810,"avatar_url":"https://avatars.githubusercontent.com/u/3670810?v=3","gravatar_id":"","url":"https://api.github.com/users/skmail","html_url":"https://github.com/skmail","followers_url":"https://api.github.com/users/skmail/followers","following_url":"https://api.github.com/users/skmail/following{/other_user}","gists_url":"https://api.github.com/users/skmail/gists{/gist_id}","starred_url":"https://api.github.com/users/skmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skmail/subscriptions","organizations_url":"https://api.github.com/users/skmail/orgs","repos_url":"https://api.github.com/users/skmail/repos","events_url":"https://api.github.com/users/skmail/events{/privacy}","received_events_url":"https://api.github.com/users/skmail/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T11:03:50Z","updated_at":"2016-03-03T11:03:50Z","body":"After searching,  Zephir  language doesn't support passing by reference"}}