Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenate - string operator on object property #316

Closed
mruz opened this issue Apr 2, 2014 · 3 comments
Closed

Concatenate - string operator on object property #316

mruz opened this issue Apr 2, 2014 · 3 comments

Comments

@mruz
Copy link
Contributor

mruz commented Apr 2, 2014

Concatenate the string not working properly:

class Tag
{
    protected static _documentTitle = null;

    public static function appendTitle(string title)
    {
        let self::_documentTitle .= title;
    }

It overwrites the _documentTitle.

Issue related to #119.

@nkt
Copy link
Contributor

nkt commented Apr 24, 2014

@mruz Can you try with latest zephir version and maybe create test for this bug?

@ovr
Copy link
Contributor

ovr commented Apr 25, 2014

this is not implemented. now i am working on this.

ovr added a commit to ovr/zephir that referenced this issue Apr 25, 2014
ovr added a commit to ovr/zephir that referenced this issue Apr 25, 2014
@ovr ovr closed this as completed in 074ca05 Apr 25, 2014
phalcon pushed a commit that referenced this issue Apr 25, 2014
Fix #316 Issue - static property variable concat with variable
@mruz
Copy link
Contributor Author

mruz commented Jul 30, 2015

How about protected property:

class Test
{
    protected a = "" { set };
    protected output = "" { get };

    public function append()
    {
        let this->output .= this->a;
    }
$t = new Test();
$t->setA('a');
$t->append();
$t->setA('b');
$t->append();
echo $t->getOutput(); //only `b` now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants