XAKEPok Posted December 6, 2009 Report Share Posted December 6, 2009 Доброго времени суток. Столкнулся с проблемой. Можно ли в функции, которая находится в одном классе, вызвать функцию из другого класса? Если да, то, наверное, стандартным способом, я не ошибаюсь? PHP. Quote Link to comment Share on other sites More sharing options...
XAKEPok Posted December 6, 2009 Author Report Share Posted December 6, 2009 Сори, вопрос глупый. Конечно можно. Ещё раз извиняюсь за флуд Quote Link to comment Share on other sites More sharing options...
Darhazer Posted December 9, 2009 Report Share Posted December 9, 2009 Уточение к ответу: можно, если функция другого класа "public", а не "private" или "protected". В некоторых языках есть модификатор "friend", который позволять данного класса визивать не-public функции другого класса. В PHP его нет. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.