Skip to content

Latest commit

 

History

History
106 lines (78 loc) · 988 Bytes

php.md

File metadata and controls

106 lines (78 loc) · 988 Bytes

PHP snippets for vim

Classes

class

<?php

namespace AlgoTech;

class ClassName
{

}

interface

<?php

namespace AlgoTech;

interface InterfaceName
{

}

Generic methods

pub

public function name($param)
{
    return null;
}

sta

public static function name($param)
{
    return null;
}

pro

protected function name($param)
{
    return null;
}

pri

private function name($param)
{
    return null;
}

Getters and setters

get

/**
 * Get variable
 *
 * @return mixed
 */
public function getVariable()
{
    return $this->variable;
}

set

/**
 * Set variable
 *
 * @param mixed $variable
 * @return mixed
 */
public function setVariable($variable)
{
    $this->variable = $variable;

    return $this;
}