Baikal\Model\User::get PHP Method

get() public method

public get ( $sPropName )
    function get($sPropName)
    {
        if ($sPropName === "password" || $sPropName === "passwordconfirm") {
            # Special handling for password and passwordconfirm
            return "";
        }
        try {
            # does the property exist on the model object ?
            $sRes = parent::get($sPropName);
        } catch (\Exception $e) {
            # no, it may belong to the oIdentityPrincipal model object
            if ($this->oIdentityPrincipal) {
                $sRes = $this->oIdentityPrincipal->get($sPropName);
            } else {
                $sRes = "";
            }
        }
        return $sRes;
    }

Usage Example

コード例 #1
0
ファイル: Users.php プロジェクト: jeromeschneider/baikal
 static function linkAddressBooks(\Baikal\Model\User $user)
 {
     return \BaikalAdmin\Controller\User\AddressBooks::buildRoute(["user" => $user->get("id")]);
 }